-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (39 loc) · 1.34 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Docker image build
# At this moment we push to image to our 'nightly' GCR repository
on:
push:
branches: [ "main" ]
workflow_dispatch: # Handy for testing
jobs:
build-quesma-docker-image:
strategy:
matrix:
module: [ "quesma" ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up Go
uses: actions/setup-go@v5
with:
cache-dependency-path: ${{ matrix.module }}/go.sum
go-version: '1.22'
- name: Login to GCR (only for build running on `main` branch)
uses: docker/login-action@v3
with:
registry: europe-docker.pkg.dev
username: _json_key
password: ${{ secrets.GCR_SERVICE_ACCOUNT_PRIVATE_KEY }}
- name: Build and export
uses: docker/build-push-action@v6
with:
context: ${{ matrix.module }}/.
tags: europe-docker.pkg.dev/metal-figure-407109/quesma-nightly/quesma:${{ github.sha }}
# Pushes to GCR only for `main` branch builds
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
build-args: |
QUESMA_BUILD_SHA=${{ github.sha }}
platforms: linux/amd64,linux/arm64
env:
DOCKER_BUILD_SUMMARY: false