ci(publish): name the missing DEPLOY_TOKEN instead of logging in with an empty password
publish / publish (push) Successful in 1m46s
publish / publish (push) Successful in 1m46s
Refs sam/archie#1785
This commit is contained in:
1 file changed
+11
@@ -23,6 +23,17 @@ jobs:
|
||||
go-version-file: go.mod
|
||||
- name: Install skopeo
|
||||
run: sudo apt-get update && sudo apt-get install -y skopeo
|
||||
# A mirror carries its own Actions secrets. An empty token here logs in
|
||||
# as an empty password, so the run reports "unauthorized" instead of
|
||||
# naming what is missing.
|
||||
- name: Check DEPLOY_TOKEN is configured
|
||||
env:
|
||||
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||
run: |
|
||||
if [ -z "$DEPLOY_TOKEN" ]; then
|
||||
echo "::error::DEPLOY_TOKEN is not set for this repository, so the publish cannot log in to git.catlow.cloud. Set the secret here, or publish from the Gitea primary."
|
||||
exit 1
|
||||
fi
|
||||
- name: Log in to the Gitea registry
|
||||
run: echo "${{ secrets.DEPLOY_TOKEN }}" | skopeo login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
|
||||
- name: Publish packages and the signed catalogue
|
||||
|
||||
Reference in new issue
Block a user