diff --git a/.github/workflows/java-cloud-bom-update-readme-table.yaml b/.github/workflows/java-cloud-bom-update-readme-table.yaml index f6033178862b..f3e34cf48afe 100644 --- a/.github/workflows/java-cloud-bom-update-readme-table.yaml +++ b/.github/workflows/java-cloud-bom-update-readme-table.yaml @@ -13,32 +13,21 @@ on: env: BUILD_SUBDIR: java-cloud-bom jobs: - filter: - runs-on: ubuntu-latest - outputs: - library: ${{ steps.filter.outputs.library }} - steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - with: - persist-credentials: false - - uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3 - id: filter - with: - filters: | - library: - - 'java-cloud-bom/**' update-readme: - needs: filter - if: ${{ needs.filter.outputs.library == 'true' }} + if: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.event.release.tag_name, 'libraries-bom/') }} runs-on: ubuntu-latest + defaults: + run: + working-directory: java-cloud-bom permissions: contents: write pull-requests: write steps: - name: Check out repository - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 with: - persist-credentials: false + # Explicitly persist credentials so subsequent git push steps can authenticate with origin + persist-credentials: true - name: Set up Python uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6