keycloak/.forgejo/workflows/container-build.yml

27 Zeilen
805 B
YAML

2025-01-18 12:39:28 +01:00
---
2025-01-21 22:25:56 +01:00
on:
push:
workflow_dispatch:
2025-01-18 12:39:28 +01:00
jobs:
container_build:
runs-on: private-vault
2025-01-21 21:17:47 +01:00
steps:
- name: Fetch repo
uses: actions/checkout@v3
2025-01-26 18:49:43 +01:00
- name: Container build
run: "./build_container.sh"
- name: Container push
env:
REGISTRY_AUTH_FILE: ${{env.RUNNER_TEMP}}/auth.json
2025-01-26 18:49:43 +01:00
run: |
2025-01-28 09:54:33 +01:00
skopeo login -u 'user' -p "${{ secrets.DOCKER_TOKEN }}" ${GITHUB_SERVER_URL}
server=${GITHUB_SERVER_URL//https:/docker:}
2025-01-28 10:41:59 +01:00
for tag in latest $GITHUB_RUN_NUMBER ; do
echo pushing image to "${server}/${GITHUB_REPOSITORY}:${tag}"
skopeo copy -q -a --dest-precompute-digests dir:image "${server}/${GITHUB_REPOSITORY}:${tag}"
2025-01-28 09:54:33 +01:00
done
- name: Cleanup
2025-01-26 18:49:43 +01:00
run: |
2025-01-28 09:54:33 +01:00
podman image prune -f