Skip to content

Commit 206ba6d

Browse files
ldenningtondscho
authored andcommitted
release: move secrets to workflow environment (git-for-windows#584)
Migrate applicable secrets to a new 'release' workflow environment. This is a security measure to help ensure secrets cannot be accessed by those without proper permissions. An example of a passing `build-git-installers` workflow with these changes can be found [here](https://github.com/ldennington/git/actions/runs/5182147378) (I set up my fork with the same migrated secret values as this repo). Note that the old actions secrets will be left in this repo until the next successful release, at which point they can be safely removed.
2 parents c071c02 + 9071323 commit 206ba6d

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

.github/workflows/build-git-installers.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
# Check prerequisites for the workflow
1010
prereqs:
1111
runs-on: ubuntu-latest
12+
environment: release
1213
env:
1314
AZ_SUB: ${{ secrets.AZURE_SUBSCRIPTION }}
1415
AZ_CREDS: ${{ secrets.AZURE_CREDENTIALS }}
@@ -49,6 +50,7 @@ jobs:
4950
# Build Windows installers (x86_64 installer & portable)
5051
windows_pkg:
5152
runs-on: windows-2019
53+
environment: release
5254
needs: prereqs
5355
env:
5456
GPG_OPTIONS: "--batch --yes --no-tty --list-options no-show-photos --verify-options no-show-photos --pinentry-mode loopback"
@@ -144,6 +146,7 @@ jobs:
144146
path: artifacts
145147
windows_artifacts:
146148
runs-on: windows-2019
149+
environment: release
147150
needs: [prereqs, windows_pkg]
148151
env:
149152
HOME: "${{github.workspace}}\\home"
@@ -370,6 +373,7 @@ jobs:
370373
osx_sign_payload:
371374
# ESRP service requires signing to run on Windows
372375
runs-on: windows-latest
376+
environment: release
373377
needs: osx_build
374378
steps:
375379
- name: Check out repository
@@ -477,6 +481,7 @@ jobs:
477481
osx_sign_and_notarize_pkg:
478482
# ESRP service requires signing to run on Windows
479483
runs-on: windows-latest
484+
environment: release
480485
needs: osx_pack
481486
steps:
482487
- name: Check out repository
@@ -653,6 +658,7 @@ jobs:
653658
path: artifacts/
654659
ubuntu_sign-artifacts:
655660
runs-on: windows-latest # Must be run on Windows due to ESRP executable OS compatibility
661+
environment: release
656662
needs: [ubuntu_build, prereqs]
657663
if: needs.prereqs.outputs.deb_signable == 'true'
658664
env:

.github/workflows/release-apt-get.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
jobs:
1414
release:
1515
runs-on: ubuntu-latest
16+
environment: release
1617
steps:
1718
- uses: actions/checkout@v3
1819

.github/workflows/release-homebrew.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
jobs:
77
release:
88
runs-on: ubuntu-latest
9+
environment: release
910
steps:
1011
- id: version
1112
name: Compute version number

.github/workflows/release-winget.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
jobs:
1414
release:
1515
runs-on: windows-latest
16+
environment: release
1617
steps:
1718
- name: Publish manifest with winget-create
1819
run: |

0 commit comments

Comments
 (0)