release-1.0.0 #39
47
.github/workflows/build-docker.yml
vendored
Normal file
47
.github/workflows/build-docker.yml
vendored
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- develop
|
||||||
|
- feature-42
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
registry: gitea.cuqmbr.xyz
|
||||||
|
steps:
|
||||||
|
- name: Login to Docker Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{env.registry}}
|
||||||
|
username: ${{vars.DOCKER_USER}}
|
||||||
|
password: ${{secrets.DOCKER_TOKEN}}
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
# https://github.com/actions/checkout/issues/1830
|
||||||
|
# https://gitea.com/gitea/act_runner/issues/164
|
||||||
|
- name: Checkout lfs
|
||||||
|
run: |
|
||||||
|
git lfs install --local
|
||||||
|
AUTH=$(git config --local http.${{ github.server_url }}/.extraheader)
|
||||||
|
git config --local --unset http.${{ github.server_url }}/.extraheader
|
||||||
|
git config --local http.${{ github.server_url }}/${{ github.repository }}.git/info/lfs/objects/batch.extraheader "$AUTH"
|
||||||
|
git lfs pull
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
platforms: linux/arm64,linux/amd64
|
||||||
|
push: true
|
||||||
|
# TODO: split tag names into multiple lines
|
||||||
|
tags: |
|
||||||
|
${{env.registry}}/${{github.repository_owner}}/${{github.event.repository.name}}/${{github.ref_name}}:${{github.sha}}
|
||||||
|
${{env.registry}}/${{github.repository_owner}}/${{github.event.repository.name}}/${{github.ref_name}}:latest
|
Loading…
Reference in New Issue
Block a user