Compare commits
3 Commits
1de8fce103
..
v0.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
| ecb1d92df3 | |||
| 98a433f53f | |||
| 60e70f7acc |
@@ -15,6 +15,11 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
cache-binary: false
|
||||||
|
|
||||||
- name: Determine image name and tags
|
- name: Determine image name and tags
|
||||||
id: meta
|
id: meta
|
||||||
env:
|
env:
|
||||||
@@ -46,11 +51,17 @@ jobs:
|
|||||||
|
|
||||||
- name: Log in to Gitea registry
|
- name: Log in to Gitea registry
|
||||||
if: steps.meta.outputs.is_release == 'true'
|
if: steps.meta.outputs.is_release == 'true'
|
||||||
uses: docker/login-action@v3
|
env:
|
||||||
with:
|
# The job image (node:20-bullseye) has no docker CLI, so docker/login-action
|
||||||
registry: ${{ vars.REGISTRY }}
|
# can't run. buildx reads ~/.docker/config.json directly, so write the auth
|
||||||
username: ${{ secrets.REGISTRY_USER }}
|
# there ourselves. Secrets via env keep them out of the templated script.
|
||||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
REGISTRY: ${{ vars.REGISTRY }}
|
||||||
|
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||||
|
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
mkdir -p "$HOME/.docker"
|
||||||
|
AUTH="$(printf '%s:%s' "$REGISTRY_USER" "$REGISTRY_PASSWORD" | base64 -w0)"
|
||||||
|
printf '{"auths":{"%s":{"auth":"%s"}}}' "$REGISTRY" "$AUTH" > "$HOME/.docker/config.json"
|
||||||
|
|
||||||
- name: Build and push release image
|
- name: Build and push release image
|
||||||
if: steps.meta.outputs.is_release == 'true'
|
if: steps.meta.outputs.is_release == 'true'
|
||||||
|
|||||||
Reference in New Issue
Block a user