new pipeline
This commit is contained in:
parent
2a7f1314c4
commit
6641fd932d
1 changed files with 24 additions and 26 deletions
|
@ -1,16 +1,14 @@
|
||||||
name: silly-game-frontend
|
name: ci
|
||||||
|
|
||||||
on: push
|
on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
permissions:
|
|
||||||
packages: write
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Repository meta
|
-
|
||||||
|
name: Repository meta
|
||||||
id: repository
|
id: repository
|
||||||
run: |
|
run: |
|
||||||
registry=${{ github.server_url }}
|
registry=${{ github.server_url }}
|
||||||
|
@ -20,34 +18,34 @@ jobs:
|
||||||
repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
|
repository="$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
|
||||||
echo "repository=${repository}" >> "$GITHUB_OUTPUT"
|
echo "repository=${repository}" >> "$GITHUB_OUTPUT"
|
||||||
echo "repository=${repository}"
|
echo "repository=${repository}"
|
||||||
- name: Docker meta
|
-
|
||||||
|
name: Docker meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
id: docker
|
id: docker
|
||||||
with:
|
with:
|
||||||
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
|
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
|
||||||
- name: Login to registry
|
-
|
||||||
|
name: Login to registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ steps.repository.outputs.registry }}
|
registry: ${{ steps.repository.outputs.registry }}
|
||||||
username: ${{ secrets.PACKAGES_USER }}
|
username: ${{ secrets.PACKAGES_USER }}
|
||||||
password: ${{ secrets.PACKAGES_TOKEN }}
|
password: ${{ secrets.PACKAGES_TOKEN }}
|
||||||
- name: Build and Push Docker Image
|
-
|
||||||
id: docker_build_push
|
name: Set up QEMU
|
||||||
uses: docker/build-push-action@v5
|
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:
|
with:
|
||||||
context: .
|
|
||||||
file: Dockerfile
|
|
||||||
push: true
|
push: true
|
||||||
|
allow: network.host
|
||||||
|
network: host
|
||||||
|
platforms: linux/arm64
|
||||||
tags: ${{ steps.docker.outputs.tags }}
|
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 }}"
|
|
Loading…
Reference in a new issue