Skip to content

Commit

Permalink
Make a pre-release and release docker build workflow, fix builds for …
Browse files Browse the repository at this point in the history
…armv7 (#826)

* split docker image builds into a pre release and release

* override rollup

* add flavor

* add flavor to input definitions

* cleanup

* comment
  • Loading branch information
t-aleksander authored Oct 17, 2024
1 parent 58ca89c commit e6192cc
Show file tree
Hide file tree
Showing 4 changed files with 1,953 additions and 5,761 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
description: "List of tags as key-value pair attributes"
required: false
type: string
flavor:
description: "List of flavors as key-value pair attributes"
required: false
type: string

env:
GHCR_REPO: ghcr.io/defguard/defguard
Expand Down Expand Up @@ -68,6 +72,7 @@ jobs:
with:
images: |
${{ env.GHCR_REPO }}
flavor: ${{ inputs.flavor }}
tags: ${{ inputs.tags }}
- name: Login to GitHub container registry
uses: docker/login-action@v3
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ concurrency:
cancel-in-progress: true

jobs:
build-latest:
build-docker-release:
# Ignore tags with -, like v1.0.0-alpha
# This job will build the docker container with the "latest" tag which
# is a tag used in production, thus it should only be run for full releases.
if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-')
name: Build Release Docker image
uses: ./.github/workflows/build-docker.yml
with:
tags: |
Expand All @@ -18,6 +23,20 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
type=sha
build-docker-prerelease:
# Only build tags with -, like v1.0.0-alpha
if: startsWith(github.ref, 'refs/tags/') && contains(github.ref, '-')
name: Build Pre-release Docker image
uses: ./.github/workflows/build-docker.yml
with:
tags: |
type=raw,value=pre-release
type=semver,pattern={{version}}
type=sha
# Explicitly disable latest tag. It will be added otherwise.
flavor: |
latest=false
create-release:
name: create-release
runs-on: self-hosted
Expand Down
3 changes: 3 additions & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
"ignoreMissing": [
"react-native"
]
},
"overrides": {
"rollup": "npm:@rollup/wasm-node"
}
},
"dependencies": {
Expand Down
Loading

0 comments on commit e6192cc

Please sign in to comment.