2022-10-11 03:26:29 +00:00
|
|
|
name: Frontend / E2E
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
tag:
|
|
|
|
required: true
|
|
|
|
type: string
|
|
|
|
release:
|
|
|
|
required: false
|
|
|
|
type: boolean
|
|
|
|
default: false
|
|
|
|
|
2022-10-11 03:38:39 +00:00
|
|
|
secrets:
|
2022-10-11 03:39:15 +00:00
|
|
|
GH_TOKEN:
|
2022-10-11 03:38:39 +00:00
|
|
|
required: true
|
|
|
|
|
2022-10-11 03:26:29 +00:00
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
name: "Publish Homebox"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-11-15 17:08:46 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-10-11 03:26:29 +00:00
|
|
|
- name: Set up Go
|
2023-12-12 14:44:23 +00:00
|
|
|
uses: actions/setup-go@v5
|
2022-10-11 03:26:29 +00:00
|
|
|
with:
|
2023-03-23 05:52:25 +00:00
|
|
|
go-version: "1.20"
|
2022-10-11 03:26:29 +00:00
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
id: qemu
|
2023-11-30 23:25:55 +00:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2022-10-11 03:26:29 +00:00
|
|
|
with:
|
|
|
|
image: tonistiigi/binfmt:latest
|
|
|
|
platforms: all
|
|
|
|
|
|
|
|
- name: install buildx
|
|
|
|
id: buildx
|
2023-11-15 17:08:37 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2022-10-11 03:26:29 +00:00
|
|
|
with:
|
|
|
|
install: true
|
|
|
|
|
|
|
|
- name: login to container registry
|
|
|
|
run: docker login ghcr.io --username hay-kot --password $CR_PAT
|
|
|
|
env:
|
2022-10-11 03:39:15 +00:00
|
|
|
CR_PAT: ${{ secrets.GH_TOKEN }}
|
2022-10-11 03:26:29 +00:00
|
|
|
|
2023-08-02 13:47:53 +00:00
|
|
|
- name: build nightly image
|
2022-10-11 17:15:57 +00:00
|
|
|
if: ${{ inputs.release == false }}
|
2022-10-11 17:15:10 +00:00
|
|
|
run: |
|
2022-10-11 17:21:06 +00:00
|
|
|
docker build --push --no-cache \
|
2022-10-11 17:27:46 +00:00
|
|
|
--tag=ghcr.io/hay-kot/homebox:${{ inputs.tag }} \
|
2022-10-11 17:21:06 +00:00
|
|
|
--build-arg=COMMIT=$(git rev-parse HEAD) \
|
|
|
|
--build-arg=BUILD_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
|
|
|
|
--platform=linux/amd64,linux/arm64,linux/arm/v7 .
|
2022-10-11 03:26:29 +00:00
|
|
|
|
2023-08-02 13:47:53 +00:00
|
|
|
- name: build nightly-rootless image
|
|
|
|
if: ${{ inputs.release == false }}
|
|
|
|
run: |
|
|
|
|
docker build --push --no-cache \
|
|
|
|
--tag=ghcr.io/hay-kot/homebox:${{ inputs.tag }}-rootless \
|
|
|
|
--build-arg=COMMIT=$(git rev-parse HEAD) \
|
|
|
|
--build-arg=BUILD_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
|
|
|
|
--file Dockerfile.rootless \
|
|
|
|
--platform=linux/amd64,linux/arm64,linux/arm/v7 .
|
|
|
|
|
2022-10-11 17:15:57 +00:00
|
|
|
- name: build release tagged the image
|
|
|
|
if: ${{ inputs.release == true }}
|
|
|
|
run: |
|
2022-10-11 17:44:07 +00:00
|
|
|
docker build --push --no-cache \
|
2022-10-11 17:15:57 +00:00
|
|
|
--tag ghcr.io/hay-kot/homebox:nightly \
|
|
|
|
--tag ghcr.io/hay-kot/homebox:latest \
|
2022-10-11 17:27:46 +00:00
|
|
|
--tag ghcr.io/hay-kot/homebox:${{ inputs.tag }} \
|
2022-10-14 01:01:01 +00:00
|
|
|
--build-arg VERSION=${{ inputs.tag }} \
|
2022-10-11 17:15:57 +00:00
|
|
|
--build-arg COMMIT=$(git rev-parse HEAD) \
|
|
|
|
--build-arg BUILD_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
|
|
|
|
--platform linux/amd64,linux/arm64,linux/arm/v7 .
|
2023-05-13 18:38:57 +00:00
|
|
|
|
|
|
|
- name: build release tagged the rootless image
|
|
|
|
if: ${{ inputs.release == true }}
|
|
|
|
run: |
|
|
|
|
docker build --push --no-cache \
|
|
|
|
--tag ghcr.io/hay-kot/homebox:nightly-rootless \
|
|
|
|
--tag ghcr.io/hay-kot/homebox:latest-rootless \
|
|
|
|
--tag ghcr.io/hay-kot/homebox:${{ inputs.tag }}-rootless \
|
|
|
|
--build-arg VERSION=${{ inputs.tag }} \
|
|
|
|
--build-arg COMMIT=$(git rev-parse HEAD) \
|
|
|
|
--build-arg BUILD_TIME=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
|
|
|
|
--platform linux/amd64,linux/arm64,linux/arm/v7 \
|
|
|
|
--file Dockerfile.rootless .
|