forked from mirrors/homebox
67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
name: Build Nightly
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
|
|
|
|
jobs:
|
|
backend-tests:
|
|
name: "Backend Server Tests"
|
|
uses: hay-kot/homebox/.github/workflows/go.yaml@main
|
|
|
|
frontend-tests:
|
|
name: "Frontend and End-to-End Tests"
|
|
uses: hay-kot/homebox/.github/workflows/frontend.yaml@main
|
|
|
|
deploy:
|
|
name: "Deploy Nightly to Fly.io"
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- backend-tests
|
|
- frontend-tests
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: superfly/flyctl-actions/setup-flyctl@master
|
|
- run: flyctl deploy --remote-only
|
|
|
|
publish:
|
|
name: "Publish Nightly"
|
|
needs:
|
|
- backend-tests
|
|
- frontend-tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.19
|
|
|
|
- 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
|
|
|
|
- name: login to container registry
|
|
run: docker login ghcr.io --username hay-kot --password $CR_PAT
|
|
env:
|
|
CR_PAT: ${{ secrets.CR_PAT }}
|
|
|
|
- name: build the image
|
|
run: |
|
|
docker build --push \
|
|
--tag ghcr.io/hay-kot/homebox:nightly \
|
|
--build-arg COMMIT=$(git rev-parse HEAD) \
|
|
--platform linux/amd64,linux/arm64,linux/arm/v7 .
|