Skip to content

Commit

Permalink
Try building standalone docker images...
Browse files Browse the repository at this point in the history
  • Loading branch information
hakwerk committed Dec 15, 2024
1 parent 4508468 commit de4f5ad
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build-dockers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
- "**"
tags:
- "v*"
#pull_request:
# branches:
# - "**"
workflow_dispatch:

jobs:
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/build-standalone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Build Standalone Docker Images

on:
# push:
# branches:
# - "**"
# tags:
# - "v*"
workflow_dispatch:

jobs:
build-standalone:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
GO_VERSION:
- 1.23.1

steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 1

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.GO_VERSION }}

- name: APT Install
run: |
sudo dpkg --add-architecture arm64
sudo apt-get -y install build-essential debhelper fakeroot crossbuild-essential-arm64
- name: Build Debian packages
run: |
make debian
make debian-arm64
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/hakwerk/test-standalone
labels: |
org.opencontainers.image.description=Standalone version of LabCA GUI for use with other ACME servers
org.opencontainers.image.title=test-standalone
tags: |
type=schedule,pattern={{date 'YYYYMMDD'}}
type=match,pattern=v(.*),group=1
type=edge,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=ref,event=branch,enable=${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }}
type=ref,event=pr
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.ACTION_PAT }}

- name: Build and push docker images
uses: docker/build-push-action@v6
with:
context: release
file: build/Dockerfile-standalone
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64/v8
push: true
tags: ${{ steps.meta.outputs.tags }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

jobs:
build-standalone:
create-release:
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down
7 changes: 7 additions & 0 deletions build/Dockerfile-standalone
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM ubuntu:focal

ARG BUILDARCH

COPY labca-gui*.deb /tmp/

RUN dpkg -i /tmp/labca-gui_*_$BUILDARCH.deb
1 change: 1 addition & 0 deletions dev/versions
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ goversion=$(grep GO_VERSION -A 3 ../boulder/.github/workflows/release.yml | egre
echo "Boulder .github/workflows/release.yml"
grep GO_VERSION -A 3 ../boulder/.github/workflows/release.yml | egrep "\- [\"0-9]+" | sed -e "s/yml-/yml/"
colorGoVersion .github/workflows/release.yml $goversion
colorGoVersion .github/workflows/build-standalone.yml $goversion
echo

goversion=$(grep GO_VERSION ../boulder/docker-compose.yml | sed -e "s/\s*GO_VERSION://")
Expand Down

0 comments on commit de4f5ad

Please sign in to comment.