Skip to content

Commit f1a5b7a

Browse files
committed
Try experimental workflows
1 parent 5971c44 commit f1a5b7a

5 files changed

+135
-24
lines changed

.github/workflows/zz_generated.check_values_schema.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DO NOT EDIT. Generated with:
22
#
3-
# devctl@6.15.1
3+
# devctl@6.17.2-dev
44
#
55
name: 'Values and schema'
66
on:

.github/workflows/zz_generated.create_release.yaml

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DO NOT EDIT. Generated with:
22
#
3-
# devctl@6.15.1
3+
# devctl@6.17.2-dev
44
#
55
name: Create Release
66
on:
@@ -93,7 +93,7 @@ jobs:
9393
uses: giantswarm/[email protected]
9494
with:
9595
binary: "architect"
96-
version: "6.11.0"
96+
version: "6.13.0"
9797
- name: Install semver
9898
uses: giantswarm/[email protected]
9999
with:
@@ -102,6 +102,12 @@ jobs:
102102
download_url: "https://github.com/fsaintjacques/${binary}-tool/archive/${version}.tar.gz"
103103
tarball_binary_path: "*/src/${binary}"
104104
smoke_test: "${binary} --version"
105+
- name: Generate a token
106+
id: generate_token
107+
uses: actions/create-github-app-token@v1
108+
with:
109+
app-id: ${{ secrets.HERALD_APP_ID }}
110+
private-key: ${{ secrets.HERALD_APP_KEY }}
105111
- name: Checkout code
106112
uses: actions/checkout@v4
107113
- name: Update project.go
@@ -122,22 +128,22 @@ jobs:
122128
fi
123129
- name: Set up git identity
124130
run: |
125-
git config --local user.email "[email protected]"
126-
git config --local user.name "taylorbot"
131+
git config --local user.email "149080493+heraldbot[bot]@users.noreply.github.com"
132+
git config --local user.name "HeraldBot[bot]"
127133
- name: Commit changes
128134
run: |
129135
file="${{ needs.gather_facts.outputs.project_go_path }}"
130136
git add $file
131137
git commit -m "Bump version to ${{ steps.update_project_go.outputs.new_version }}"
132138
- name: Push changes
133139
env:
134-
REMOTE_REPO: "https://${{ github.actor }}:${{ secrets.TAYLORBOT_GITHUB_ACTION }}@github.com/${{ github.repository }}.git"
140+
REMOTE_REPO: "https://${{ github.actor }}:${{ steps.generate_token.outputs.token }}@github.com/${{ github.repository }}.git"
135141
branch: "${{ github.ref }}-version-bump"
136142
run: |
137143
git push "${REMOTE_REPO}" HEAD:${{ env.branch }}
138144
- name: Create PR
139145
env:
140-
GITHUB_TOKEN: "${{ secrets.TAYLORBOT_GITHUB_ACTION }}"
146+
GITHUB_TOKEN: "${{ steps.generate_token.outputs.token }}"
141147
base: "${{ github.ref }}"
142148
branch: "${{ github.ref }}-version-bump"
143149
version: "${{ needs.gather_facts.outputs.version }}"
@@ -153,9 +159,17 @@ jobs:
153159
outputs:
154160
upload_url: ${{ steps.create_gh_release.outputs.upload_url }}
155161
steps:
162+
- name: Generate a token
163+
id: generate_token
164+
uses: actions/create-github-app-token@v1
165+
with:
166+
app-id: ${{ secrets.HERALD_APP_ID }}
167+
private-key: ${{ secrets.HERALD_APP_KEY }}
156168
- name: Checkout code
157169
uses: actions/checkout@v4
158170
with:
171+
token: ${{ steps.generate_token.outputs.token }}
172+
persist-credentials: false
159173
ref: ${{ github.sha }}
160174
- name: Ensure correct version in project.go
161175
if: ${{ needs.gather_facts.outputs.project_go_path != '' && needs.gather_facts.outputs.ref_version != 'true' }}
@@ -171,26 +185,25 @@ jobs:
171185
path: ./CHANGELOG.md
172186
- name: Set up git identity
173187
run: |
174-
git config --local user.email "[email protected]"
175-
git config --local user.name "taylorbot"
188+
git config --local user.email "149080493+heraldbot[bot]@users.noreply.github.com"
189+
git config --local user.name "HeraldBot[bot]"
176190
- name: Create tag
177191
run: |
178192
version="${{ needs.gather_facts.outputs.version }}"
179193
git tag "v$version" ${{ github.sha }}
180194
- name: Push tag
181195
env:
182-
REMOTE_REPO: "https://${{ github.actor }}:${{ secrets.TAYLORBOT_GITHUB_ACTION }}@github.com/${{ github.repository }}.git"
196+
REMOTE_REPO: "https://${{ github.actor }}:${{ steps.generate_token.outputs.token }}@github.com/${{ github.repository }}.git"
183197
run: |
184198
git push "${REMOTE_REPO}" --tags
185199
- name: Create release
186200
id: create_gh_release
187-
uses: actions/create-release@v1
201+
uses: ncipollo/release-action@v1
188202
env:
189-
GITHUB_TOKEN: "${{ secrets.TAYLORBOT_GITHUB_ACTION }}"
203+
GITHUB_TOKEN: "${{ steps.generate_token.outputs.token }}"
190204
with:
191205
body: ${{ steps.changelog_reader.outputs.changes }}
192-
tag_name: "v${{ needs.gather_facts.outputs.version }}"
193-
release_name: "v${{ needs.gather_facts.outputs.version }}"
206+
tag: "v${{ needs.gather_facts.outputs.version }}"
194207

195208
create-release-branch:
196209
name: Create release branch

.github/workflows/zz_generated.create_release_pr.yaml

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DO NOT EDIT. Generated with:
22
#
3-
# devctl@6.15.1
3+
# devctl@6.17.2-dev
44
#
55
name: Create Release PR
66
on:
@@ -48,6 +48,18 @@ jobs:
4848
skip: ${{ steps.pr_exists.outputs.skip }}
4949
version: ${{ steps.gather_facts.outputs.version }}
5050
steps:
51+
- name: Generate a token
52+
id: generate_token
53+
uses: actions/create-github-app-token@v1
54+
with:
55+
app-id: ${{ secrets.HERALD_APP_ID }}
56+
private-key: ${{ secrets.HERALD_APP_KEY }}
57+
- name: Checkout code
58+
uses: actions/checkout@v4
59+
with:
60+
token: ${{ steps.generate_token.outputs.token }}
61+
persist-credentials: false
62+
ref: ${{ needs.gather_facts.outputs.branch }}
5163
- name: Gather facts
5264
id: gather_facts
5365
run: |
@@ -65,7 +77,7 @@ jobs:
6577
6678
version="$(echo $head | awk -F# '{print $NF}')"
6779
if [[ $version =~ ^major|minor|patch$ ]]; then
68-
gh auth login --with-token <<<$(echo -n ${{ secrets.TAYLORBOT_GITHUB_ACTION }})
80+
gh auth login --with-token <<<$(echo -n ${{ steps.generate_token.outputs.token }})
6981
gh_api_get_latest_release_version()
7082
{
7183
if ! version="$(gh api "repos/$1/releases/latest" --jq '.tag_name[1:] | split(".") | .[0], .[1], .[2]')"
@@ -124,12 +136,13 @@ jobs:
124136
- name: Check if PR exists
125137
id: pr_exists
126138
env:
127-
GITHUB_TOKEN: "${{ secrets.TAYLORBOT_GITHUB_ACTION }}"
139+
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
128140
run: |
129141
head="${{ steps.gather_facts.outputs.branch }}"
130142
branch="${head#refs/heads/}" # Strip "refs/heads/" prefix.
131-
if gh pr view --repo "${{ github.repository }}" "${branch}" --json state --jq .state | grep -i 'open' > /dev/null; then
132-
gh pr view --repo "${{ github.repository }}" "${branch}"
143+
144+
if gh pr list --head "${branch}" --json state --jq '.[].state' | grep -i 'open' > /dev/null; then
145+
gh pr list --head "${branch}"
133146
echo "skip=true" >> $GITHUB_OUTPUT
134147
else
135148
echo "skip=false" >> $GITHUB_OUTPUT
@@ -151,9 +164,17 @@ jobs:
151164
with:
152165
binary: "architect"
153166
version: "6.11.0"
167+
- name: Generate a token
168+
id: generate_token
169+
uses: actions/create-github-app-token@v1
170+
with:
171+
app-id: ${{ secrets.HERALD_APP_ID }}
172+
private-key: ${{ secrets.HERALD_APP_KEY }}
154173
- name: Checkout code
155174
uses: actions/checkout@v4
156175
with:
176+
token: ${{ steps.generate_token.outputs.token }}
177+
persist-credentials: false
157178
ref: ${{ needs.gather_facts.outputs.branch }}
158179
- name: Prepare release changes
159180
run: |
@@ -208,8 +229,8 @@ jobs:
208229
fi
209230
- name: Set up git identity
210231
run: |
211-
git config --local user.email "[email protected]"
212-
git config --local user.name "taylorbot"
232+
git config --local user.email "149080493+heraldbot[bot]@users.noreply.github.com"
233+
git config --local user.name "HeraldBot[bot]"
213234
- name: Create release commit
214235
env:
215236
version: "${{ needs.gather_facts.outputs.version }}"
@@ -218,12 +239,12 @@ jobs:
218239
git commit -m "Release v${{ env.version }}"
219240
- name: Push changes
220241
env:
221-
remote_repo: "https://${{ github.actor }}:${{ secrets.TAYLORBOT_GITHUB_ACTION }}@github.com/${{ github.repository }}.git"
242+
remote_repo: "https://${{ github.actor }}:${{ steps.generate_token.outputs.token }}@github.com/${{ github.repository }}.git"
222243
run: |
223244
git push "${remote_repo}" HEAD:${{ needs.gather_facts.outputs.branch }}
224245
- name: Create PR
225246
env:
226-
GITHUB_TOKEN: "${{ secrets.TAYLORBOT_GITHUB_ACTION }}"
247+
GITHUB_TOKEN: "${{ steps.generate_token.outputs.token }}"
227248
base: "${{ needs.gather_facts.outputs.base }}"
228249
version: "${{ needs.gather_facts.outputs.version }}"
229250
run: |
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# DO NOT EDIT. Generated with:
2+
#
3+
4+
#
5+
name: Fix Vulnerabilities
6+
on:
7+
push:
8+
branches:
9+
- 'renovate/*'
10+
workflow_dispatch:
11+
inputs:
12+
branch:
13+
description: "Branch where to fix vulnerabilities"
14+
required: true
15+
type: string
16+
workflow_call:
17+
inputs:
18+
branch:
19+
required: true
20+
type: string
21+
jobs:
22+
gather_facts:
23+
name: Gather facts
24+
runs-on: ubuntu-22.04
25+
outputs:
26+
repo_name: ${{ steps.gather_facts.outputs.repo_name }}
27+
branch: ${{ steps.gather_facts.outputs.branch }}
28+
steps:
29+
- name: Gather facts
30+
id: gather_facts
31+
run: |
32+
head="${{ inputs.branch || github.event.ref }}"
33+
echo "branch=${head}" >> $GITHUB_OUTPUT
34+
35+
head="${head#refs/heads/}" # Strip "refs/heads/" prefix.
36+
repo_name="$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')"
37+
echo "repo_name=\"$repo_name\" base=\"$base\" head=\"$head\" version=\"$version\""
38+
echo "repo_name=${repo_name}" >> $GITHUB_OUTPUT
39+
echo "head=${head}" >> $GITHUB_OUTPUT
40+
run_nancy_fixer:
41+
name: Fix vulnerabilities with nancy-fixer
42+
runs-on: ubuntu-22.04
43+
needs:
44+
- gather_facts
45+
steps:
46+
- name: Generate a token
47+
id: generate_token
48+
uses: actions/create-github-app-token@v1
49+
with:
50+
app-id: ${{ secrets.HERALD_APP_ID }}
51+
private-key: ${{ secrets.HERALD_APP_KEY }}
52+
- name: Checkout code
53+
uses: actions/checkout@v4
54+
with:
55+
token: ${{ steps.generate_token.outputs.token }}
56+
persist-credentials: false
57+
ref: ${{ needs.gather_facts.outputs.branch }}
58+
- name: Install nancy-fixer
59+
run: |
60+
go install github.com/giantswarm/[email protected]
61+
mod upgrade
62+
- name: Run nancy-fixer fix
63+
run: |
64+
nancy-fixer fix
65+
- name: Set up git identity
66+
run: |
67+
git config --local user.email "149080493+heraldbot[bot]@users.noreply.github.com"
68+
git config --local user.name "HeraldBot[bot]"
69+
- name: Commit new files
70+
run: |
71+
git add -A
72+
git commit -m "Apply fixes for vulnerabilities"
73+
- name: Push changes
74+
env:
75+
remote_repo: "https://${{ github.actor }}:${{ steps.generate_token.outputs.token }}@github.com/${{ github.repository }}.git"
76+
run: |
77+
git push "${remote_repo}" HEAD:${{ needs.gather_facts.outputs.branch }}

.github/workflows/zz_generated.gitleaks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DO NOT EDIT. Generated with:
22
#
3-
# devctl@6.15.1
3+
# devctl@6.17.2-dev
44
#
55
name: gitleaks
66

0 commit comments

Comments
 (0)