generated from mrz1836/go-template
-
Notifications
You must be signed in to change notification settings - Fork 15
49 lines (46 loc) · 1.55 KB
/
manual-build-dockers.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
48
49
name: "[Manual] Build Docker Images"
run-name: "Build docker image version ${{ inputs.version || github.ref_name }} from ref ${{ github.ref_name }}"
permissions:
contents: write
packages: write
on:
workflow_dispatch:
inputs:
version:
description: 'Version name to build, if not specified, then the name of the branch will be used'
required: false
registries:
description: 'Docker registries to use'
required: true
default: 'dockerhub,aws'
type: choice
options:
- 'dockerhub'
- 'aws'
- 'dockerhub,aws'
jobs:
release_default:
if: contains('${{ inputs.registries }}', 'dockerhub')
uses: bactions/workflows/.github/workflows/release-go-server.yml@aws-support
with:
version: ${{ inputs.version || github.ref_name }}
ref: ${{ github.ref }}
cgo_enabled: true
release_create: false
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
release_aws:
if: contains('${{ inputs.registries }}', 'aws')
uses: bactions/workflows/.github/workflows/release-go-server.yml@aws-support
with:
version: ${{ inputs.version || github.ref_name }}
ref: ${{ github.ref }}
cgo_enabled: true
release_create: false
docker_registry: public.ecr.aws
# TODO: use secret or variable for that
docker_org: k9t8b9f1
secrets:
DOCKER_USERNAME: ${{ secrets.SPV_AWS_ACCESS_KEY_ID }}
DOCKER_PASSWORD: ${{ secrets.SPV_AWS_SECRET_ACCESS_KEY }}