mirror of
https://github.com/getAlby/hub.git
synced 2026-08-17 13:07:49 +02:00
35 lines
1.2 KiB
YAML
35 lines
1.2 KiB
YAML
name: Multiplatform Docker build & push
|
|
on:
|
|
push:
|
|
jobs:
|
|
build:
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
IMAGENAME: ${{ github.event.repository.name }}
|
|
TAG: ${{ github.ref_name }}
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
# see https://github.com/orgs/community/discussions/25678#discussioncomment-5242449
|
|
- name: Delete huge unnecessary tools folder
|
|
run: rm -rf /opt/hostedtoolcache
|
|
- uses: actions/checkout@v4
|
|
name: Check out code
|
|
- name: Install Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: "./go.mod"
|
|
- name: Run tests
|
|
run: mkdir frontend/dist && touch frontend/dist/tmp && go test ./...
|
|
- name: Docker build
|
|
if: github.actor != 'dependabot[bot]'
|
|
uses: mr-smithers-excellent/docker-build-push@v6
|
|
id: build
|
|
with:
|
|
image: ${{ env.IMAGENAME }}
|
|
registry: ${{ env.REGISTRY }}
|
|
multiPlatform: true
|
|
platform: linux/amd64,linux/arm64
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
addLatest: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
|
buildArgs: TAG=${{ env.TAG }}
|