CI: add auth to registry

This commit is contained in:
phil 2024-11-01 06:34:41 +01:00
parent 50601d86cf
commit 55fdde94a9

View file

@ -16,7 +16,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
cache: "pnpm"
- name: Install dependencies
run: pnpm install
@ -32,8 +32,21 @@ jobs:
containerfiles: |
./Containerfile
- name: Workaround for bug of podman-login
run: |
mkdir $HOME/.docker
echo "{ \"auths\": {} }" > $HOME/.docker/config.json
- name: Log in to container registry (with another workaround)
uses: actions/podman-login@v1
with:
registry: ${{ vars.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
auth_file_path: /tmp/auth.json
- uses: actions/push-to-registry@v2
with:
registry: "docker://${{ vars.REPOSITORY }}"
registry: "docker://${{ vars.REGISTRY }}"
image: treetrail-frontend
tags: latest