Skip to content

Commit

Permalink
chore(build): switch to alpine as build image (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
bakito authored Feb 15, 2025
1 parent 43773ba commit 34c7115
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 7 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/codeql-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
schedule:
- cron: '32 0 * * 4'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze
Expand All @@ -29,7 +33,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- published

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
packages: write

Expand All @@ -33,25 +40,27 @@ jobs:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build and push ${{github.event.release.tag_name }}
- name: Build images ${{github.event.release.tag_name }}
id: docker_build_release
uses: docker/build-push-action@v6
if: ${{ github.event.release.tag_name != '' }}
with:
push: true
pull: true
tags: ghcr.io/bakito/sealed-secrets-web:latest,ghcr.io/bakito/sealed-secrets-web:${{ github.event.release.tag_name }},quay.io/bakito/sealed-secrets-web:latest,quay.io/bakito/sealed-secrets-web:${{ github.event.release.tag_name }}
platforms: linux/amd64,linux/arm64
provenance: false
build-args: |
VERSION=${{ github.event.release.tag_name }}
BUILD=${{ env.curr_date }}
- name: Build and push main
- name: Build images
id: docker_build_main
uses: docker/build-push-action@v6
if: ${{ github.event.release.tag_name == '' }}
with:
push: true
push: ${{ github.ref == 'refs/heads/main' }}
pull: true
tags: ghcr.io/bakito/sealed-secrets-web:main,quay.io/bakito/sealed-secrets-web:main
platforms: linux/amd64,linux/arm64
provenance: false
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
e2e:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
go:
name: Go Tests
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM golang:1.23-bullseye AS builder
FROM golang:1.24-alpine AS builder
WORKDIR /go/src/app

RUN apt-get update && apt-get install -y upx curl
RUN apk update && apk add upx

ARG VERSION=main
ARG BUILD="N/A"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/bakito/sealed-secrets-web

go 1.23.4
go 1.24.0

require (
github.com/bitnami-labs/sealed-secrets v0.28.0
Expand Down

0 comments on commit 34c7115

Please sign in to comment.