fix(ci): use registry token secret for image publish
This commit is contained in:
parent
9020670bb3
commit
5a686f4630
1 changed files with 2 additions and 2 deletions
|
|
@ -26,14 +26,14 @@ jobs:
|
||||||
- name: Push image to Gitea registry
|
- name: Push image to Gitea registry
|
||||||
shell: bash -l {0}
|
shell: bash -l {0}
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
SHA=$(git rev-parse --short HEAD)
|
SHA=$(git rev-parse --short HEAD)
|
||||||
TOKEN=$(
|
TOKEN=$(
|
||||||
curl -fsS \
|
curl -fsS \
|
||||||
"https://gitea.coulomb.social/v2/token?service=container_registry&scope=repository:coulomb/inter-hub:push,pull" \
|
"https://gitea.coulomb.social/v2/token?service=container_registry&scope=repository:coulomb/inter-hub:push,pull" \
|
||||||
-u "tegwick:${GITEA_TOKEN}" \
|
-u "tegwick:${REGISTRY_TOKEN}" \
|
||||||
| awk -F'"' '/token/{print $4}'
|
| awk -F'"' '/token/{print $4}'
|
||||||
)
|
)
|
||||||
if [ -z "${TOKEN}" ]; then
|
if [ -z "${TOKEN}" ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue