Skip to content

Commit

Permalink
build: add image-build action
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood committed Jan 30, 2025
1 parent 1576078 commit 7e36e48
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
56 changes: 56 additions & 0 deletions .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Lagoon Image Build - buildx

on:
push:
branches:
- 'gh_actions**'
pull_request:
branches:
- 'gh_actions**'

jobs:
build:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build
uses: docker/bake-action@v6
env:
PLATFORMS: "linux/amd64,linux/arm64"
TAG: "gh_actions"
with:
files: |
./docker-bake.hcl
targets: default
push: true
set: |
*.cache-from=type=gha
*.cache-to=type=gha,mode=max
2 changes: 1 addition & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ variable "IMAGE_REPO" {
}

variable "TAG" {
default = "latest"
default = "gh_action"
}

variable "LAGOON_VERSION" {
Expand Down

0 comments on commit 7e36e48

Please sign in to comment.