-
Notifications
You must be signed in to change notification settings - Fork 113
47 lines (42 loc) · 1.55 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
46
47
name: Release
on:
release:
types: [released]
workflow_dispatch:
inputs:
version:
description: Version
required: true
jobs:
build-amd-image:
name: Build AMD Image
runs-on: self-hosted
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log In to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Add version into docker image
id: add_version
run: |
echo "${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.version }}" > LAGO_VERSION
echo "lago_version=${{ github.event_name == 'release' && github.event.release.tag_name || github.event.inputs.version }}" >> "$GITHUB_OUTPUT"
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/arm64,linux/amd64
push: true
tags: getlago/api:${{ steps.add_version.outputs.lago_version }}
build-args: |
SEGMENT_WRITE_KEY=${{ secrets.SEGMENT_WRITE_KEY }}
GOCARDLESS_CLIENT_ID=${{ secrets.PRODUCTION_GOCARDLESS_CLIENT_ID }}
GOCARDLESS_CLIENT_SECRET=${{ secrets.PRODUCTION_GOCARDLESS_CLIENT_SECRET }}
LAGO_OAUTH_URL=https://proxy.getlago.com