Update scanner version #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update scanner version | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: 0 5 * * 1 | |
jobs: | |
update-scanner: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: master # this is our target branch | |
fetch-depth: 0 # we need to fetch all branches | |
- name: Checkout scanner repo | |
uses: actions/checkout@v4 | |
with: | |
repository: stackrox/scanner | |
path: deps/scanner | |
fetch-depth: 0 # we need to fetch tags | |
- name: Update version | |
run: make -sC deps/scanner tag | tee SCANNER_VERSION | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
token: '${{ secrets.RHACS_BOT_GITHUB_TOKEN }}' | |
commit-message: Update SCANNER_VERSION | |
committer: '${{ secrets.RHACS_BOT_GITHUB_USERNAME }} <${{ secrets.RHACS_BOT_GITHUB_EMAIL }}>' | |
author: '${{ secrets.RHACS_BOT_GITHUB_USERNAME }} <${{ secrets.RHACS_BOT_GITHUB_EMAIL }}>' | |
branch: update_scanner_version | |
signoff: false | |
delete-branch: true | |
title: 'chore(scanner): Update SCANNER_VERSION' | |
body: | | |
Weekly update of SCANNER_VERSION to latest master version | |
labels: | | |
ci-all-qa-tests | |
dependencies | |
team-reviewers: scanner | |
draft: false | |
- name: Enable Pull Request Automerge | |
if: steps.cpr.outputs.pull-request-operation == 'created' | |
uses: peter-evans/enable-pull-request-automerge@v3 | |
with: | |
token: '${{ secrets.RHACS_BOT_GITHUB_TOKEN }}' | |
pull-request-number: '${{ steps.cpr.outputs.pull-request-number }}' | |
merge-method: squash |