Skip to content

Commit 4b36068

Browse files
add action updater (#3)
1 parent 257765c commit 4b36068

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: GitHub actions version updater
2+
3+
on:
4+
# can be used to run workflow manually
5+
workflow_dispatch:
6+
schedule:
7+
# Automatically run on every 27th of every other month
8+
# to release a version for other repo that uses this action
9+
- cron: '0 7 27 */2 *'
10+
11+
jobs:
12+
self-hosted-status:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
runner-status: ${{ steps.runnerstatus.outputs.status }}
16+
steps:
17+
- name: Check runner status
18+
id: runnerstatus
19+
uses: SatelCreative/[email protected]
20+
with:
21+
github-runner-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} #Should have access to manage runner
22+
org-name: SatelCreative
23+
24+
check-versions:
25+
needs: [self-hosted-status]
26+
# saadmk11/github doesn't work on Self hosted runner yet
27+
runs-on: ubuntu-latest #${{ contains(needs.self-hosted-status.outputs.runner-status, 'online') && 'self-hosted' || 'ubuntu-latest' }}
28+
steps:
29+
- uses: actions/[email protected]
30+
with:
31+
# Classic personal access token with repo and workflow scope
32+
token: ${{ secrets.REPO_WORKFLOW_ACCESS_TOKEN }}
33+
34+
- name: GitHub Actions Version Updater
35+
uses: saadmk11/[email protected]
36+
with:
37+
token: ${{ secrets.REPO_WORKFLOW_ACCESS_TOKEN }}
38+
pull_request_title: '👷 Monthly actions version update'
39+
pull_request_team_reviewers: "DevOps"
40+
pull_request_branch: 'feature/monthly-actions-update'
41+
pull_request_labels: 'Type: DevOps'
42+
update_version_with: "release-tag"
43+
release_types: 'major, minor, patch'

0 commit comments

Comments
 (0)