File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Migrate Release Secrets
2+
3+ on :
4+ workflow_dispatch :
5+
6+ permissions :
7+ contents : read
8+
9+ jobs :
10+ migrate :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Transfer encrypted release credentials to A3S-Lab/a3s
14+ shell : bash
15+ env :
16+ GH_TOKEN : ${{ secrets.A3S_MIGRATION_ADMIN_TOKEN }}
17+ CARGO_TOKEN_VALUE : ${{ secrets.CARGO_REGISTRY_TOKEN }}
18+ HOMEBREW_TOKEN_VALUE : ${{ secrets.HOMEBREW_TAP_TOKEN }}
19+ run : |
20+ set -euo pipefail
21+ test -n "${GH_TOKEN:-}"
22+ test -n "${CARGO_TOKEN_VALUE:-}"
23+ test -n "${HOMEBREW_TOKEN_VALUE:-}"
24+
25+ gh secret set CARGO_REGISTRY_TOKEN \
26+ --repo A3S-Lab/a3s --body "$CARGO_TOKEN_VALUE"
27+ gh secret set HOMEBREW_TAP_TOKEN \
28+ --repo A3S-Lab/a3s --body "$HOMEBREW_TOKEN_VALUE"
29+
30+ names="$(gh secret list --repo A3S-Lab/a3s --app actions \
31+ --json name --jq '.[].name')"
32+ grep -Fqx CARGO_REGISTRY_TOKEN <<<"$names"
33+ grep -Fqx HOMEBREW_TAP_TOKEN <<<"$names"
You can’t perform that action at this time.
0 commit comments