github.com/quay/claircore@v1.5.28/.github/workflows/update-clair.yml (about) 1 on: 2 push: 3 tags: 4 - v*.*.* 5 6 name: Create PR for Clair 7 8 jobs: 9 send-pull-requests: 10 runs-on: ubuntu-latest 11 steps: 12 - name: Setup 13 run: | 14 tag=`basename ${{ github.ref }}` 15 branch="chore-update-claircore-to-${tag}" 16 echo "VERSION=${tag}" >> $GITHUB_ENV 17 echo "BRANCH=${branch}" >> $GITHUB_ENV 18 19 - name: Generate token 20 id: generate_token 21 uses: tibdex/github-app-token@v2 22 with: 23 app_id: ${{ secrets.CLAIR_APP_ID }} 24 private_key: ${{ secrets.CLAIR_APP_PRIVATE_KEY }} 25 26 - name: Checkout code 27 uses: actions/checkout@v4 28 with: 29 ref: main 30 repository: quay/clair 31 32 - name: Update claircore 33 run: | 34 # Update the script files to the latest version. 35 go get github.com/quay/claircore@${{ env.VERSION }} 36 go mod tidy 37 38 - name: Create Pull Request 39 id: cpr 40 uses: peter-evans/create-pull-request@v6 41 with: 42 add-paths: go.mod,go.sum 43 token: ${{ steps.generate_token.outputs.token }} 44 base: main 45 commit-message: | 46 chore: update claircore to ${{ env.VERSION }} 47 48 Update claircore to latest release. 49 50 committer: Claircore-CI <${{ github.actor }}@users.noreply.github.com> 51 author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> 52 signoff: true 53 branch: ${{ env.BRANCH }} 54 delete-branch: true 55 title: 'chore: update claircore to ${{ env.VERSION }}' 56 body: | 57 Update claircore to latest release. 58 labels: | 59 automated