-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (59 loc) · 1.87 KB
/
update-base-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Check for aws-cli update
on:
schedule:
- cron: '0 13 * * 2' # 13:00 UTC every Tuesday
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
outputs:
needs-update: ${{ steps.check.outputs.needs-update }}
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- run: |
echo "AWS_CLI_VERSION=$(just current-version)" >>"$GITHUB_ENV"
- uses: KineticCafe/[email protected]
id: check
with:
base-image: amazon/aws-cli:${{ env.AWS_CLI_VERSION }}
image: kineticcafe/aws-cli-session-manager:latest
platforms: linux/amd64,linux/arm64
pr:
permissions:
contents: write
pull-requests: write
needs: check
if: needs.check.outputs.needs-update == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.KINETICCAFE_BOT_CLIENT_ID }}
private-key: ${{ secrets.KINETICCAFE_BOT_PRIVATE_KEY }}
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- run: |
just update-base-image
- uses: peter-evans/[email protected]
id: pr
with:
token: ${{ steps.generate-token.outputs.token }}
sign-commits: true
commit-message: |
${{ env.UPDATE_TITLE }}
${{ env.UPDATE_BODY }}
branch: update-base-image/${{ env.UPDATE_VERSION }}
title: ${{ env.UPDATE_TITLE }}
body: ${{ env.UPDATE_BODY }}
labels: |
automated
assignees: |
halostatue
reviewers: |
halostatue
- run: |
gh pr merge --rebase --auto ${{ steps.pr.outputs.pull-request-number }}
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}