-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (66 loc) · 2.21 KB
/
update-deployment-tag.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
72
name: Update deployment tag
permissions:
id-token: write
contents: read
on:
workflow_dispatch:
inputs:
name:
description: Name of deployment
required: true
tag:
description: Which tag
required: true
repository:
description: Repository
required: false
repository_dispatch:
types: [update-tag]
jobs:
update-deployment-tag:
name: Update deployment tag
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Setup inputs 📥
uses: simenandre/setup-inputs@v1
id: inputs
- name:
Set summary 📝 – ${{ steps.inputs.outputs.name }} 👉 ${{
steps.inputs.outputs.tag }}
run: |
echo "**${{ steps.inputs.outputs.name }}** set to **${{ steps.inputs.outputs.tag }}**" >> $GITHUB_STEP_SUMMARY
- name: Set config 🔧
uses: simenandre/pulumi-config@v2
id: config
env:
GITHUB_TOKEN: ${{ secrets.BJERKBOT_GITHUB_TOKEN }}
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
with:
stack-name: branches/branches-main/main
key: ${{ steps.inputs.outputs.name }}:tag
value: ${{ steps.inputs.outputs.tag }}
- name: Get changelog from commit 📜
uses: simenandre/get-commit-changelog@v1
id: changelog
if: steps.config.outputs.key
with:
token: ${{ secrets.BJERKBOT_GITHUB_TOKEN }}
repository: ${{ steps.inputs.outputs.repository }}
base: ${{ fromJson(steps.config.outputs.key).value }}
head: ${{ steps.inputs.outputs.tag }}
- name: Create Pull Request 🎉
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.BJERKBOT_GITHUB_TOKEN }}
commit-message:
bump ${{ steps.inputs.outputs.name }} to ${{
steps.inputs.outputs.tag }}
branch: bump-tag-${{ steps.inputs.outputs.name }}
title:
'chore: bump ${{ steps.inputs.outputs.name }} tag to `${{
steps.inputs.outputs.tag }}`'
body: |
Automated tag change. 🎉
${{ steps.changelog.outputs.changelog }}