diff --git a/.github/workflows/check-samples.yml b/.github/workflows/check-samples.yml index 11ceaed..69dff9f 100644 --- a/.github/workflows/check-samples.yml +++ b/.github/workflows/check-samples.yml @@ -6,7 +6,7 @@ on: jobs: check_samples: name: Check Samples project - if: github.repository == 'spring-projects/spring-grpc' + if: ${{ github.repository == 'spring-projects/spring-grpc' }} strategy: matrix: include: diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml index ab0a666..ea48ec1 100644 --- a/.github/workflows/ci-pr.yml +++ b/.github/workflows/ci-pr.yml @@ -10,7 +10,7 @@ on: jobs: build_and_verify: name: Build and Verify - if: github.repository == 'spring-projects/spring-grpc' + if: ${{ github.repository == 'spring-projects/spring-grpc' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -21,11 +21,7 @@ jobs: distribution: 'temurin' cache: maven - name: Build and test - env: - signing_key: ${{ secrets.GPG_PRIVATE_KEY }} run: | - echo "${signing_key}" > private.asc - gpg --import --batch --no-tty private.asc ./mvnw -B clean install - name: Capture Test Results if: failure() diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6a31a45..55c26c5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,7 +12,7 @@ permissions: contents: write jobs: build: - if: github.repository_owner == 'spring-projects' + if: ${{ github.repository == 'spring-projects/spring-grpc' }} runs-on: ubuntu-latest steps: - name: Checkout @@ -27,9 +27,10 @@ jobs: cache: maven - name: Set up refname build if: github.event.inputs.build-refname + env: + BUILD_REFNAME=${{ github.event.inputs.build-refname }} run: | - git fetch --depth 1 https://github.com/$GITHUB_REPOSITORY ${{ github.event.inputs.build-refname }} - export BUILD_REFNAME=${{ github.event.inputs.build-refname }} + git fetch --depth 1 https://github.com/$GITHUB_REPOSITORY "$BUILD_REFNAME" echo "BUILD_REFNAME=$BUILD_REFNAME" >> $GITHUB_ENV export BUILD_VERSION=$(git cat-file --textconv FETCH_HEAD:pom.xml | python3 -c "import xml.etree.ElementTree as xml; from sys import stdin; print(xml.parse(stdin).getroot().find('{http://maven.apache.org/POM/4.0.0}version').text)") echo BUILD_VERSION=$BUILD_VERSION >> $GITHUB_ENV