2022-09-08 23:09:26 +00:00
|
|
|
name: Build Nightly
|
2022-08-30 02:30:36 +00:00
|
|
|
|
|
|
|
on:
|
2022-09-09 18:20:38 +00:00
|
|
|
workflow_run:
|
|
|
|
workflows:
|
|
|
|
- "Go Build/Test"
|
|
|
|
- "Frontend / Integration"
|
|
|
|
types:
|
|
|
|
- completed
|
2022-08-30 02:30:36 +00:00
|
|
|
push:
|
2022-09-08 23:09:26 +00:00
|
|
|
branches: [main]
|
2022-08-30 02:30:36 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
runs-on: ubuntu-latest
|
2022-09-09 18:20:38 +00:00
|
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
2022-08-30 02:30:36 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
2022-09-05 08:26:21 +00:00
|
|
|
go-version: 1.19
|
2022-09-08 23:09:26 +00:00
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
id: qemu
|
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
with:
|
|
|
|
image: tonistiigi/binfmt:latest
|
|
|
|
platforms: all
|
|
|
|
|
|
|
|
- name: install buildx
|
|
|
|
id: buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
with:
|
|
|
|
install: true
|
|
|
|
|
2022-08-30 02:30:36 +00:00
|
|
|
- name: login to container registry
|
|
|
|
run: docker login ghcr.io --username hay-kot --password $CR_PAT
|
|
|
|
env:
|
|
|
|
CR_PAT: ${{ secrets.CR_PAT }}
|
2022-09-08 23:09:26 +00:00
|
|
|
|
|
|
|
- name: build the image
|
|
|
|
run: |
|
2022-09-08 23:49:06 +00:00
|
|
|
docker build --push \
|
2022-09-08 23:45:13 +00:00
|
|
|
--tag ghcr.io/hay-kot/homebox:nightly \
|
2022-09-08 23:09:26 +00:00
|
|
|
--build-arg COMMIT=$(git rev-parse HEAD) \
|
2022-09-08 23:49:06 +00:00
|
|
|
--platform linux/amd64,linux/arm64,linux/arm/v7 .
|