2023-07-29 17:01:58 +00:00
|
|
|
name: Build image
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
pull_request:
|
|
|
|
|
push:
|
|
|
|
|
branches:
|
|
|
|
|
- main
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
build:
|
|
|
|
|
runs-on: hetzner
|
|
|
|
|
steps:
|
2025-08-11 13:09:19 +00:00
|
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
2023-07-29 17:01:58 +00:00
|
|
|
with:
|
|
|
|
|
github-server-url: https://code.mor.re
|
|
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
2025-02-28 13:11:36 +00:00
|
|
|
uses: https://github.com/docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
|
2023-07-29 17:01:58 +00:00
|
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
|
id: buildx
|
2025-06-18 09:08:46 +00:00
|
|
|
uses: https://github.com/docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
|
2023-07-29 17:01:58 +00:00
|
|
|
|
|
|
|
|
- name: Login to registry
|
|
|
|
|
if: github.event_name != 'pull_request'
|
2025-09-29 11:08:19 +00:00
|
|
|
uses: https://github.com/docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
|
2023-07-29 17:01:58 +00:00
|
|
|
with:
|
|
|
|
|
registry: code.mor.re
|
|
|
|
|
username: ${{ github.repository_owner }}
|
|
|
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
|
|
|
|
|
|
- name: Docker meta
|
|
|
|
|
id: meta
|
2025-08-01 10:09:15 +00:00
|
|
|
uses: https://github.com/docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
|
2023-07-29 17:01:58 +00:00
|
|
|
with:
|
|
|
|
|
flavor: |
|
|
|
|
|
latest=false
|
|
|
|
|
images: |
|
|
|
|
|
code.mor.re/${{ github.repository }}
|
|
|
|
|
|
|
|
|
|
- name: Build and push
|
2025-05-27 17:10:32 +00:00
|
|
|
uses: https://github.com/docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
|
2023-07-29 17:01:58 +00:00
|
|
|
with:
|
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|