diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 9044a560c4..83924e2766 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -21,6 +21,8 @@ jobs: uses: actions/checkout@v2 with: token: ${{ secrets.GH_TOKEN }} + - name: Set current date as env variable + run: echo "NOW=$(date +'%Y-%m-%dT%H%M%S')" >> $GITHUB_ENV - uses: gradle/wrapper-validation-action@v1 - name: Set up JDK uses: actions/setup-java@v3 @@ -30,7 +32,7 @@ jobs: - name: Extract branch name if: success() id: extract_branch - run: echo "value=${GITHUB_REF:11}" >> $GITHUB_OUTPUT + run: echo "value=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT - name: Build Documentation uses: gradle/gradle-build-action@v2 with: @@ -45,8 +47,8 @@ jobs: if: success() uses: actions/upload-artifact@v3 with: - name: grails-docs.zip - path: ./build/distributions/grails-docs-*.zip + name: grails-docs-${{ env.NOW }}.zip + path: ./build/distributions/grails-docs-*.*.zip - name: Determine docs target repository if: success() uses: haya14busa/action-cond@v1