Skip to content

Commit dbd121e

Browse files
committed
Migrate secrets in deployment workflow to Doppler
1 parent ca90e5c commit dbd121e

File tree

1 file changed

+10
-29
lines changed

1 file changed

+10
-29
lines changed

.github/workflows/deploy.yml

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,14 @@ on:
88
permissions:
99
id-token: write
1010
contents: read
11+
1112
jobs:
1213
create-release:
1314
runs-on: ubuntu-latest
1415
if: "!contains(github.event.head_commit.message, 'skip-ci: create-release')"
1516
steps:
1617
- name: Checkout Git repository
1718
uses: actions/checkout@v3
18-
- name: Import Vault secrets
19-
uses: hashicorp/vault-action@v2
20-
with:
21-
url: https://vault.hunterwittenborn.com
22-
token: ${{ secrets.VAULT_TOKEN }}
23-
secrets: |
24-
kv/data/ci github_api_key | GH_TOKEN
2519
- name: Setup makedeb APT repositories
2620
uses: makedeb/setup-makedeb@main
2721
with:
@@ -34,20 +28,15 @@ jobs:
3428
version="$(just get-version)"
3529
release_notes="$(parse-changelog CHANGELOG.md "${version}")"
3630
gh release create "v${version}" --title "v${version}" --target "${GITHUB_SHA}" -n "${release_notes}"
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_CUSTOM }}
3733
deploy-mpr:
3834
runs-on: ubuntu-latest
3935
needs: [create-release]
4036
if: "!failure() && !contains(github.event.head_commit.message, 'skip-ci: deploy-mpr')"
4137
steps:
4238
- name: Checkout Git repository
4339
uses: actions/checkout@v3
44-
- name: Import Vault secrets
45-
uses: hashicorp/vault-action@v2
46-
with:
47-
url: https://vault.hunterwittenborn.com
48-
token: ${{ secrets.VAULT_TOKEN }}
49-
secrets: |
50-
kv/data/ci ssh_key | SSH_KEY
5140
- name: Setup makedeb APT repositories
5241
uses: makedeb/setup-makedeb@main
5342
- name: Publish MPR package
@@ -85,6 +74,8 @@ jobs:
8574
git add .
8675
git commit -m "Bump version to '${pkgver}-${pkgrel}'"
8776
git push
77+
env:
78+
SSH_KEY: ${{ secrets.SSH_KEY }}
8879
deploy-snap:
8980
runs-on: ubuntu-latest
9081
needs: [create-release]
@@ -96,13 +87,6 @@ jobs:
9687
uses: makedeb/setup-makedeb@main
9788
with:
9889
pbmpr-repo: true
99-
- name: Import Vault secrets
100-
uses: hashicorp/vault-action@v2
101-
with:
102-
url: https://vault.hunterwittenborn.com
103-
token: ${{ secrets.VAULT_TOKEN }}
104-
secrets: |
105-
kv/data/ci snapcraft_store_credentials | SNAPCRAFT_STORE_CREDENTIALS
10690
- name: Build Celeste Snap
10791
uses: snapcore/action-build@v1
10892
id: snapcraft-build
@@ -113,24 +97,19 @@ jobs:
11397
with:
11498
snap: ${{ steps.snapcraft-build.outputs.snap }}
11599
release: stable
100+
env:
101+
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
116102
deploy-flathub:
117103
runs-on: ubuntu-latest
118104
needs: [deploy-snap]
119105
if: "!failure() && !contains(github.event.head_commit.message, 'skip-ci: deply-flathub')"
120106
steps:
121-
- name: Import Vault secrets
122-
uses: hashicorp/vault-action@v2
123-
with:
124-
url: https://vault.hunterwittenborn.com
125-
token: ${{ secrets.VAULT_TOKEN }}
126-
secrets: |
127-
kv/data/ci github_api_key | GH_TOKEN
128107
- name: Checkout Flathub Celeste Git repository
129108
uses: actions/checkout@v3
130109
with:
131110
repository: flathub/com.hunterwittenborn.Celeste
132111
path: com.hunterwittenborn.Celeste
133-
token: "${{ env.GH_TOKEN }}"
112+
token: ${{ secrets.GH_TOKEN_CUSTOM }}
134113
- name: Setup makedeb APT repositories
135114
uses: makedeb/setup-makedeb@main
136115
- name: Update Flathub package
@@ -169,3 +148,5 @@ jobs:
169148
170149
echo "Waiting for @flathubbot to report status checks..."
171150
done
151+
env:
152+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_CUSTOM }}

0 commit comments

Comments
 (0)