-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.74 KB
/
update-image-digest.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
name: Update Image Digest
on:
repository_dispatch:
types:
- update-image-digest
concurrency:
group: deploy-${{ join(github.event.client_payload.images, ',') }}
jobs:
update-image-digest:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
- name: Update Image Digest
run: go run ./cmd/update-image-digest -i ${{ join(github.event.client_payload.images, ',') }} -d ${{ github.event.client_payload.digest }}
- name: Create Pull Request
id: create-pull-request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
commit-message: |
[skip ci] update ${{ github.event.client_payload.images[0] }} 🔜 ${{ github.event.client_payload.digest }}
https://github.com/${{ github.event.client_payload.github.repository }}/commit/${{ github.event.client_payload.github.sha }}
author: StarryBlueSky-bot <97773209+StarryBlueSky-bot@users.noreply.github.com>
branch: ci/update-image-digest
branch-suffix: random
delete-branch: true
title: update ${{ github.event.client_payload.images[0] }} 🔜 ${{ github.event.client_payload.digest }}
body: https://github.com/${{ github.event.client_payload.github.repository }}/commit/${{ github.event.client_payload.github.sha }}
- name: Automerge
if: steps.create-pull-request.outputs.pull-request-number
uses: peter-evans/enable-pull-request-automerge@v3
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
pull-request-number: ${{ steps.create-pull-request.outputs.pull-request-number }}