GitHub actions version updater #1
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: GitHub actions version updater | |
on: | |
# can be used to run workflow manually | |
workflow_dispatch: | |
schedule: | |
# Automatically run on every 27th of every other month | |
# to release a version for other repo that uses this action | |
- cron: '0 7 27 */2 *' | |
jobs: | |
self-hosted-status: | |
runs-on: ubuntu-latest | |
outputs: | |
runner-status: ${{ steps.runnerstatus.outputs.status }} | |
steps: | |
- name: Check runner status | |
id: runnerstatus | |
uses: SatelCreative/[email protected] | |
with: | |
github-runner-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} #Should have access to manage runner | |
org-name: SatelCreative | |
check-versions: | |
needs: [self-hosted-status] | |
# saadmk11/github doesn't work on Self hosted runner yet | |
runs-on: ubuntu-latest #${{ contains(needs.self-hosted-status.outputs.runner-status, 'online') && 'self-hosted' || 'ubuntu-latest' }} | |
steps: | |
- uses: actions/[email protected] | |
with: | |
# Classic personal access token with repo and workflow scope | |
token: ${{ secrets.REPO_WORKFLOW_ACCESS_TOKEN }} | |
- name: GitHub Actions Version Updater | |
uses: saadmk11/[email protected] | |
with: | |
token: ${{ secrets.REPO_WORKFLOW_ACCESS_TOKEN }} | |
pull_request_title: '👷 Monthly actions version update' | |
pull_request_team_reviewers: "DevOps" | |
pull_request_branch: 'feature/monthly-actions-update' | |
pull_request_labels: 'Type: DevOps' | |
update_version_with: "release-tag" | |
release_types: 'major, minor, patch' |