Skip to content

Commit

Permalink
ci(SPV-1114): publish on AWS ECR from manual build
Browse files Browse the repository at this point in the history
  • Loading branch information
dorzepowski committed Oct 16, 2024
1 parent 57b44c3 commit c25731e
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/manual-build-dockers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,20 @@ on:
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:
uses: bactions/workflows/.github/workflows/release-go-server.yml@main
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 }}
Expand All @@ -23,3 +32,18 @@ jobs:
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 }}

0 comments on commit c25731e

Please sign in to comment.