new pipeline

This commit is contained in:
miwr 2025-04-08 10:23:02 +02:00
parent 2a7f1314c4
commit 6641fd932d

View file

@ -1,16 +1,14 @@
name: silly-game-frontend
name: ci
on: push
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
build:
runs-on: ubuntu-22.04
steps:
- name: Repository meta
-
name: Repository meta
id: repository
run: |
registry=${{ github.server_url }}
@ -20,34 +18,34 @@ jobs:
repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
echo "repository=${repository}" >> "$GITHUB_OUTPUT"
echo "repository=${repository}"
- name: Docker meta
-
name: Docker meta
uses: docker/metadata-action@v5
id: docker
with:
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
- name: Login to registry
-
name: Login to registry
uses: docker/login-action@v3
with:
registry: ${{ steps.repository.outputs.registry }}
username: ${{ secrets.PACKAGES_USER }}
password: ${{ secrets.PACKAGES_TOKEN }}
- name: Build and Push Docker Image
id: docker_build_push
uses: docker/build-push-action@v5
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: '--allow-insecure-entitlement network.host'
driver-opts: network=host
-
name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
push: true
allow: network.host
network: host
platforms: linux/arm64
tags: ${{ steps.docker.outputs.tags }}
labels: |
org.opencontainers.image.title=${{ github.repository }}
org.opencontainers.image.version=${{ github.sha }}
org.opencontainers.image.created=${{ github.event.inputs.timestamp }}
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}
org.opencontainers.image.revision=${{ github.sha }}
- name: Echo Image Details
run: |
echo "Docker image built and pushed to:"
echo "${{ steps.docker_build_push.outputs.digest }}"
echo "${{ steps.docker_build_push.outputs.tags }}"