Public Access
Merge claude/api-image-to-gitea-registry: push the API image to Gitea's own registry
This commit is contained in:
commit
07bd5c9886
1 file changed
+15
-5
@@ -1326,6 +1326,19 @@ jobs:
|
|||||||
# inspects — it is the thing that gets deployed.
|
# inspects — it is the thing that gets deployed.
|
||||||
needs: [build]
|
needs: [build]
|
||||||
runs-on: [linux]
|
runs-on: [linux]
|
||||||
|
# Gitea's own container registry, on the forge this workflow runs on, under the same owner as
|
||||||
|
# the repository - so the image is listed with the repository's packages rather than on a
|
||||||
|
# registry of its own. Lowercase, because an image reference may not contain capitals and
|
||||||
|
# the owner is DodoTech-Public.
|
||||||
|
#
|
||||||
|
# REGISTRY_USERNAME and REGISTRY_PASSWORD are a Gitea account and a token of its own with
|
||||||
|
# package read and write, allowed to publish for that owner. Not the job's built-in
|
||||||
|
# GITEA_TOKEN, tempting as it is here: the container registry does not accept an Actions
|
||||||
|
# task token and answers `unauthorized` at /v2/ (go-gitea/gitea#23642). Spelunk's workflow
|
||||||
|
# pushes the same way, with the same two secrets.
|
||||||
|
env:
|
||||||
|
REGISTRY: git.dodotech.cloud
|
||||||
|
IMAGE: dodotech-public/dodossh-api
|
||||||
steps:
|
steps:
|
||||||
# Duplicated from the build job; see the comment there for why it cannot be factored
|
# Duplicated from the build job; see the comment there for why it cannot be factored
|
||||||
# out. Any change here has to be made in all three.
|
# out. Any change here has to be made in all three.
|
||||||
@@ -1451,9 +1464,6 @@ jobs:
|
|||||||
# changes, and where setup-buildx-action starts earning its place.
|
# changes, and where setup-buildx-action starts earning its place.
|
||||||
- name: work out the tags
|
- name: work out the tags
|
||||||
id: tags
|
id: tags
|
||||||
env:
|
|
||||||
REGISTRY: registry-docker.dodotech.cloud
|
|
||||||
IMAGE: dodotech/dodossh-api
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
repo="$REGISTRY/$IMAGE"
|
repo="$REGISTRY/$IMAGE"
|
||||||
@@ -1578,7 +1588,7 @@ jobs:
|
|||||||
echo "username: ${#REGISTRY_USERNAME} characters; password: set"
|
echo "username: ${#REGISTRY_USERNAME} characters; password: set"
|
||||||
|
|
||||||
printf '%s' "$REGISTRY_PASSWORD" \
|
printf '%s' "$REGISTRY_PASSWORD" \
|
||||||
| docker login registry-docker.dodotech.cloud \
|
| docker login "$REGISTRY" \
|
||||||
--username "$REGISTRY_USERNAME" --password-stdin
|
--username "$REGISTRY_USERNAME" --password-stdin
|
||||||
|
|
||||||
- name: push
|
- name: push
|
||||||
@@ -1596,7 +1606,7 @@ jobs:
|
|||||||
# does not leave it behind.
|
# does not leave it behind.
|
||||||
- name: log out
|
- name: log out
|
||||||
if: always() && github.event_name != 'pull_request'
|
if: always() && github.event_name != 'pull_request'
|
||||||
run: docker logout registry-docker.dodotech.cloud
|
run: docker logout "$REGISTRY"
|
||||||
|
|
||||||
# No job here publishes the desktop *release* channel, and there is not going to be one. The desktop
|
# No job here publishes the desktop *release* channel, and there is not going to be one. The desktop
|
||||||
# nightly job above publishes a different application — its own pack id, its own Velopack channel, its own
|
# nightly job above publishes a different application — its own pack id, its own Velopack channel, its own
|
||||||
|
|||||||
Reference in new issue
Block a user