Compare commits
2
Commits
4dbf8a78c2
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e47e62780a | ||
|
|
d6fc2477f3 |
@@ -35,7 +35,17 @@ jobs:
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
set -eu
|
||||
echo "${{ secrets.GITEA_TOKEN }}" | docker login git.ffaerber.duckdns.org -u "${{ github.actor }}" --password-stdin
|
||||
# Not the automatic Actions token: this Gitea's package registry rejects
|
||||
# it (docker login returns a bare "unauthorized"), with or without a
|
||||
# permissions: packages: write block. REGISTRY_TOKEN is an org secret
|
||||
# holding a personal access token scoped to write:package only.
|
||||
if [ -z "${{ secrets.REGISTRY_TOKEN }}" ]; then
|
||||
echo "REGISTRY_TOKEN is not set — create a token with the write:package scope" >&2
|
||||
echo "and add it as an org secret on token-for-token. The image built fine;" >&2
|
||||
echo "only the push needs it." >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login git.ffaerber.duckdns.org -u "${{ vars.REGISTRY_USER || 'ffaerber' }}" --password-stdin
|
||||
docker tag "$IMAGE:$SHA" "$IMAGE:latest"
|
||||
docker push "$IMAGE:$SHA"
|
||||
docker push "$IMAGE:latest"
|
||||
|
||||
Reference in new issue
Block a user