Skip to content

Commit 0a96edf

Browse files
feat(ci): add environments
1 parent 3027fd2 commit 0a96edf

17 files changed

+69
-28
lines changed

.github/workflows/__call-docker.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020
pull_request:
2121
workflow_call:
2222
inputs:
23+
gh_bot_name:
24+
description: 'GitHub bot name to use for the workflow.'
25+
required: false
26+
type: string
2327
maximize_build_space:
2428
description: 'Maximize build space.'
2529
required: false
@@ -48,7 +52,7 @@ on:
4852
description: 'Docker Hub access token to use for the workflow.'
4953
required: false
5054
GH_BOT_NAME:
51-
description: 'GitHub bot name to use for the workflow.'
55+
description: 'GitHub bot name to use for the workflow. This option is deprecated. Use `gh_bot_name` input.'
5256
required: false
5357
GH_BOT_TOKEN:
5458
description: 'GitHub bot token to use for the workflow.'
@@ -123,6 +127,9 @@ jobs:
123127
contents: read
124128
packages: write
125129
runs-on: ubuntu-22.04
130+
environment:
131+
name: docker-${{ matrix.tag }}
132+
url: https://hub.docker.com/r/${{ needs.check_dockerfiles.outputs.base_tag }}/tags?name=-${{ matrix.tag }}
126133
strategy:
127134
fail-fast: false
128135
matrix: ${{ fromJson(needs.check_dockerfiles.outputs.matrix) }}
@@ -250,7 +257,7 @@ jobs:
250257
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
251258
with:
252259
registry: ghcr.io
253-
username: ${{ secrets.GH_BOT_NAME }}
260+
username: ${{ inputs.gh_bot_name || secrets.GH_BOT_NAME }}
254261
password: ${{ secrets.GH_BOT_TOKEN }}
255262

256263
- name: Add problem matcher

.github/workflows/__call-release-notifier.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
name: Update blog
2222
if: github.repository_owner == 'LizardByte'
2323
runs-on: ubuntu-latest
24+
environment:
25+
name: release-announcement
26+
url: ${{ steps.create-pr.outputs.pull-request-url }}
27+
env:
28+
BLOG_REPO: ${{ github.repository_owner }}/${{ github.repository_owner }}.github.io
2429
steps:
2530
- name: Check topics
2631
env:
@@ -62,7 +67,7 @@ jobs:
6267
steps.check-release.outputs.isLatestRelease == 'true'
6368
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6469
with:
65-
repository: "LizardByte/LizardByte.github.io"
70+
repository: ${{ env.BLOG_REPO }}
6671

6772
- name: Create blog post
6873
if: >-

.github/workflows/__call-update-changelog.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@ jobs:
1616
update-changelog:
1717
name: Update Changelog
1818
runs-on: ubuntu-latest
19+
environment:
20+
name: changelog
21+
url: ${{ github.event.repository.html_url }}/blob/${{ env.CHANGELOG_BRANCH }}/${{ env.CHANGELOG_FILE }}
22+
env:
23+
CHANGELOG_BRANCH: changelog
24+
CHANGELOG_FILE: CHANGELOG.md
1925
steps:
2026
- name: Update Changelog
2127
uses: LizardByte/actions/actions/release_changelog@9bf3ef783775e17fe6b8dde3585d94ec570b93c2 # v2026.212.22356
2228
with:
23-
changelogBranch: changelog
24-
changelogFile: CHANGELOG.md
29+
changelogBranch: ${{ env.CHANGELOG_BRANCH }}
30+
changelogFile: ${{ env.CHANGELOG_FILE }}
2531
token: ${{ secrets.GH_TOKEN }}

.github/workflows/__call-update-docs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ on:
1717

1818
jobs:
1919
update-docs:
20+
environment:
21+
name: ReadTheDocs
22+
url: https://${{ steps.get_slug.outputs.RTD_SLUG }}.readthedocs.io//latest
2023
env:
2124
RTD_SLUG: ${{ inputs.READTHEDOCS_SLUG }}
2225
RTD_TOKEN: ${{ secrets.READTHEDOCS_TOKEN }}
@@ -26,12 +29,14 @@ jobs:
2629
runs-on: ubuntu-latest
2730
steps:
2831
- name: Get RTD_SLUG
32+
id: get_slug
2933
run: |
3034
# if the RTD_SLUG is not set, use the repository name in lowercase
3135
if [ -z "${RTD_SLUG}" ]; then
3236
RTD_SLUG=$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]')
3337
fi
3438
echo "RTD_SLUG=${RTD_SLUG}" >> "${GITHUB_ENV}"
39+
echo "RTD_SLUG=${RTD_SLUG}" >> "${GITHUB_OUTPUTS}"
3540
3641
- name: Deactivate deleted release
3742
if: >-

.github/workflows/__call-update-flathub-repo.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ on:
1818

1919
jobs:
2020
update-flathub-repo:
21+
environment:
22+
name: Flathub
23+
url: ${{ steps.create-pr.outputs.pull-request-url }}
2124
env:
2225
FLATHUB_PKG: dev.lizardbyte.app.${{ github.event.repository.name }}
2326
runs-on: ubuntu-latest

.github/workflows/__call-update-homebrew-repo.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ on:
1919
jobs:
2020
update-homebrew-repo:
2121
runs-on: ubuntu-latest
22+
environment:
23+
name: Homebrew
24+
url: https://github.com/${{ github.repository_owner }}/homebrew-homebrew/commits
2225
steps:
2326
- name: Check if Homebrew repo
2427
id: check-label

.github/workflows/__call-update-pacman-repo.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ on:
1919
jobs:
2020
update-pacman-repo:
2121
runs-on: ubuntu-latest
22+
environment:
23+
name: pacman-repo
24+
url: ${{ steps.create-pr.outputs.pull-request-url }}
25+
env:
26+
PACMAN_REPO: ${{ github.repository_owner }}/pacman-repo
2227
steps:
2328
- name: Check if pacman repo
2429
id: check-label
@@ -61,7 +66,7 @@ jobs:
6166
steps.check-release.outputs.isLatestRelease == 'true'
6267
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6368
with:
64-
repository: ${{ github.repository_owner }}/pacman-repo
69+
repository: ${{ env.PACMAN_REPO }}
6570

6671
- name: Prep
6772
id: prep

.github/workflows/__call-update-winget-repo.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ on:
2121
jobs:
2222
update-winget-repo:
2323
runs-on: ubuntu-latest
24+
environment:
25+
name: Winget
26+
url: https://github.com/microsoft/winget-pkgs/issues?q=is%3Apr%20author%3A${{ vars.GH_BOT_NAME }}
2427
steps:
2528
- name: Check if Winget repo
2629
id: check-label
@@ -57,6 +60,7 @@ jobs:
5760
extract: false
5861

5962
- name: Release to WinGet
63+
id: winget
6064
if: >-
6165
steps.check-label.outputs.hasTopic == 'true' &&
6266
fromJson(steps.download.outputs.downloaded_files)[0]

.github/workflows/__cla-gist-replicator.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ jobs:
1818
replicate_cla:
1919
name: Replicate CLA
2020
runs-on: ubuntu-latest
21+
environment:
22+
name: cla-gist
23+
url: https://gist.github.com/${{ vars.CLA_GIST_ID }}
2124
strategy: # the action doesn't currently support multiple files
2225
fail-fast: true # false to run all, true to fail entire job if any fail
2326
max-parallel: 1 # let's update files one by one to avoid complications
@@ -34,6 +37,6 @@ jobs:
3437
uses: exuanbo/actions-deploy-gist@47697fceaeea2006a90594ee24eb9cd0a1121ef8 # v1.1.4
3538
with:
3639
token: ${{ secrets.GH_BOT_TOKEN }}
37-
gist_id: ${{ secrets.CLA_GIST_ID }}
40+
gist_id: ${{ vars.CLA_GIST_ID }}
3841
file_path: ${{ matrix.file_path }}
3942
file_type: text

.github/workflows/__global-replicator.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
exclude_private: ${{ env.EXCLUDE_PRIVATE }}
4545
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
4646
github_token: ${{ secrets.GH_BOT_TOKEN }}
47-
committer_username: ${{ secrets.GH_BOT_NAME }}
47+
committer_username: ${{ vars.GH_BOT_NAME }}
4848
committer_email: ${{ secrets.GH_BOT_EMAIL }}
4949
patterns_to_ignore: ''
5050
patterns_to_remove: >-
@@ -96,7 +96,7 @@ jobs:
9696
exclude_private: ${{ env.EXCLUDE_PRIVATE }}
9797
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
9898
github_token: ${{ secrets.GH_BOT_TOKEN }}
99-
committer_username: ${{ secrets.GH_BOT_NAME }}
99+
committer_username: ${{ vars.GH_BOT_NAME }}
100100
committer_email: ${{ secrets.GH_BOT_EMAIL }}
101101
patterns_to_ignore: ''
102102
patterns_to_include: >-
@@ -119,7 +119,7 @@ jobs:
119119
exclude_private: ${{ env.EXCLUDE_PRIVATE }}
120120
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
121121
github_token: ${{ secrets.GH_BOT_TOKEN }}
122-
committer_username: ${{ secrets.GH_BOT_NAME }}
122+
committer_username: ${{ vars.GH_BOT_NAME }}
123123
committer_email: ${{ secrets.GH_BOT_EMAIL }}
124124
patterns_to_ignore: ''
125125
patterns_to_include: >-
@@ -139,7 +139,7 @@ jobs:
139139
exclude_private: ${{ env.EXCLUDE_PRIVATE }}
140140
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
141141
github_token: ${{ secrets.GH_BOT_TOKEN }}
142-
committer_username: ${{ secrets.GH_BOT_NAME }}
142+
committer_username: ${{ vars.GH_BOT_NAME }}
143143
committer_email: ${{ secrets.GH_BOT_EMAIL }}
144144
patterns_to_ignore: ''
145145
patterns_to_include: >-
@@ -159,7 +159,7 @@ jobs:
159159
exclude_private: ${{ env.EXCLUDE_PRIVATE }}
160160
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
161161
github_token: ${{ secrets.GH_BOT_TOKEN }}
162-
committer_username: ${{ secrets.GH_BOT_NAME }}
162+
committer_username: ${{ vars.GH_BOT_NAME }}
163163
committer_email: ${{ secrets.GH_BOT_EMAIL }}
164164
patterns_to_ignore: ''
165165
patterns_to_include: >-
@@ -179,7 +179,7 @@ jobs:
179179
exclude_private: ${{ env.EXCLUDE_PRIVATE }}
180180
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
181181
github_token: ${{ secrets.GH_BOT_TOKEN }}
182-
committer_username: ${{ secrets.GH_BOT_NAME }}
182+
committer_username: ${{ vars.GH_BOT_NAME }}
183183
committer_email: ${{ secrets.GH_BOT_EMAIL }}
184184
patterns_to_ignore: ''
185185
patterns_to_include: >-
@@ -199,7 +199,7 @@ jobs:
199199
exclude_private: ${{ env.EXCLUDE_PRIVATE }}
200200
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
201201
github_token: ${{ secrets.GH_BOT_TOKEN }}
202-
committer_username: ${{ secrets.GH_BOT_NAME }}
202+
committer_username: ${{ vars.GH_BOT_NAME }}
203203
committer_email: ${{ secrets.GH_BOT_EMAIL }}
204204
patterns_to_ignore: ''
205205
patterns_to_include: >-
@@ -219,7 +219,7 @@ jobs:
219219
exclude_private: ${{ env.EXCLUDE_PRIVATE }}
220220
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
221221
github_token: ${{ secrets.GH_BOT_TOKEN }}
222-
committer_username: ${{ secrets.GH_BOT_NAME }}
222+
committer_username: ${{ vars.GH_BOT_NAME }}
223223
committer_email: ${{ secrets.GH_BOT_EMAIL }}
224224
patterns_to_ignore: ''
225225
patterns_to_include: >-
@@ -240,7 +240,7 @@ jobs:
240240
exclude_private: ${{ env.EXCLUDE_PRIVATE }}
241241
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
242242
github_token: ${{ secrets.GH_BOT_TOKEN }}
243-
committer_username: ${{ secrets.GH_BOT_NAME }}
243+
committer_username: ${{ vars.GH_BOT_NAME }}
244244
committer_email: ${{ secrets.GH_BOT_EMAIL }}
245245
patterns_to_ignore: ''
246246
patterns_to_include: >-
@@ -260,7 +260,7 @@ jobs:
260260
exclude_private: ${{ env.EXCLUDE_PRIVATE }}
261261
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
262262
github_token: ${{ secrets.GH_BOT_TOKEN }}
263-
committer_username: ${{ secrets.GH_BOT_NAME }}
263+
committer_username: ${{ vars.GH_BOT_NAME }}
264264
committer_email: ${{ secrets.GH_BOT_EMAIL }}
265265
patterns_to_ignore: ''
266266
patterns_to_include: >-
@@ -280,7 +280,7 @@ jobs:
280280
exclude_private: ${{ env.EXCLUDE_PRIVATE }}
281281
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
282282
github_token: ${{ secrets.GH_BOT_TOKEN }}
283-
committer_username: ${{ secrets.GH_BOT_NAME }}
283+
committer_username: ${{ vars.GH_BOT_NAME }}
284284
committer_email: ${{ secrets.GH_BOT_EMAIL }}
285285
patterns_to_ignore: ''
286286
patterns_to_include: >-
@@ -301,7 +301,7 @@ jobs:
301301
exclude_private: ${{ env.EXCLUDE_PRIVATE }}
302302
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
303303
github_token: ${{ secrets.GH_BOT_TOKEN }}
304-
committer_username: ${{ secrets.GH_BOT_NAME }}
304+
committer_username: ${{ vars.GH_BOT_NAME }}
305305
committer_email: ${{ secrets.GH_BOT_EMAIL }}
306306
patterns_to_ignore: ''
307307
patterns_to_include: >-
@@ -321,7 +321,7 @@ jobs:
321321
exclude_private: ${{ env.EXCLUDE_PRIVATE }}
322322
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
323323
github_token: ${{ secrets.GH_BOT_TOKEN }}
324-
committer_username: ${{ secrets.GH_BOT_NAME }}
324+
committer_username: ${{ vars.GH_BOT_NAME }}
325325
committer_email: ${{ secrets.GH_BOT_EMAIL }}
326326
patterns_to_ignore: ''
327327
patterns_to_include: >-

0 commit comments

Comments
 (0)