Add CI/CD: multi-arch Docker build workflow
This commit is contained in:
parent
8f3615c5cf
commit
863c14120a
2 changed files with 54 additions and 0 deletions
33
.forgejo/workflows/build.yaml
Normal file
33
.forgejo/workflows/build.yaml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
name: Build & Push Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Forgejo Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.moritz.run
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: git.moritz.run/helios/helios-remote:latest
|
||||
cache-from: type=registry,ref=git.moritz.run/helios/helios-remote:cache
|
||||
cache-to: type=registry,ref=git.moritz.run/helios/helios-remote:cache,mode=max
|
||||
Loading…
Add table
Add a link
Reference in a new issue