Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: cleanup & more improvements for the release-docker-hub job #386

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 14 additions & 17 deletions .github/workflows/release-docker-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ name: Release to Docker Hub
# How to test:
# > git tag v9.9.9
# > git tag --delete v9.9.9
# > act --artifact-server-path /tmp/artifacts -s GITHUB_TOKEN="$(gh auth token)" --var DOCKERHUB_FMGP_USERNAME=$DOCKERHUB_FMGP_USERNAME -s DOCKERHUB_FMGP_TOKEN=$DOCKERHUB_FMGP_TOKEN --var DOCKERHUB_IDENTUS_USERNAME=$DOCKERHUB_IDENTUS_USERNAME -s DOCKERHUB_IDENTUS_TOKEN=$DOCKERHUB_IDENTUS_TOKEN -j build-and-push-docker-images schedule
# > act --artifact-server-path /tmp/artifacts -s GITHUB_TOKEN="$(gh auth token)" --var DOCKERHUB_FMGP_USERNAME=$DOCKERHUB_FMGP_USERNAME -s DOCKERHUB_FMGP_TOKEN=$DOCKERHUB_FMGP_TOKEN --var DOCKERHUB_IDENTUS_USERNAME=$DOCKERHUB_IDENTUS_USERNAME -s DOCKERHUB_IDENTUS_TOKEN=$DOCKERHUB_IDENTUS_TOKEN --workflows '.github/workflows/release-docker-hub.yml' push
# > act --artifact-server-path /tmp/artifacts -s GITHUB_TOKEN="$(gh auth token)" --var DOCKERHUB_IDENTUS_USERNAME=$DOCKERHUB_IDENTUS_USERNAME -s DOCKERHUB_IDENTUS_TOKEN=$DOCKERHUB_IDENTUS_TOKEN -j build-and-push-docker-images schedule
# > act --artifact-server-path /tmp/artifacts -s GITHUB_TOKEN="$(gh auth token)" --var DOCKERHUB_IDENTUS_USERNAME=$DOCKERHUB_IDENTUS_USERNAME -s DOCKERHUB_IDENTUS_TOKEN=$DOCKERHUB_IDENTUS_TOKEN --workflows '.github/workflows/release-docker-hub.yml' push
# > act --artifact-server-path /tmp/artifacts -s GITHUB_TOKEN="$(gh auth token)" \
# --var DOCKERHUB_FMGP_USERNAME=$DOCKERHUB_FMGP_USERNAME -s DOCKERHUB_FMGP_TOKEN=$DOCKERHUB_FMGP_TOKEN \
# --var DOCKERHUB_IDENTUS_USERNAME=$DOCKERHUB_IDENTUS_USERNAME -s DOCKERHUB_IDENTUS_TOKEN=$DOCKERHUB_IDENTUS_TOKEN \
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
docker:
- # identus # This is a test account
registry: docker.io
repository: ${{vars.DOCKERHUB_IDENTUS_USERNAME}}
repository: identus
username: ${{vars.DOCKERHUB_IDENTUS_USERNAME}}
password_name: DOCKERHUB_IDENTUS_TOKEN
tags_noschedule: |
Expand All @@ -95,16 +95,16 @@ jobs:
type=raw,value=latest,enable=${{ !startsWith(github.ref, 'refs/tags/v') }}
tags_schedule: |
type=schedule,pattern=nightly,enable={{is_default_branch}}
- # fmgp # My presonal acount also for testing
registry: docker.io
repository: ${{vars.DOCKERHUB_FMGP_USERNAME}}
username: ${{vars.DOCKERHUB_FMGP_USERNAME}}
password_name: DOCKERHUB_FMGP_TOKEN
tags_noschedule: |
type=semver,pattern={{version}},enable={{is_default_branch}}
type=raw,value=latest,enable={{is_default_branch}}
tags_schedule: |
type=schedule,enable={{is_default_branch}}
# - # fmgp # My presonal acount also for testing
# registry: docker.io
# repository: ${{vars.DOCKERHUB_FMGP_USERNAME}}
# username: ${{vars.DOCKERHUB_FMGP_USERNAME}}
# password_name: DOCKERHUB_FMGP_TOKEN
# tags_noschedule: |
# type=semver,pattern={{version}},enable={{is_default_branch}}
# type=raw,value=latest,enable={{is_default_branch}}
# tags_schedule: |
# type=schedule,enable={{is_default_branch}}

steps:
- name: Set test variable
Expand All @@ -129,9 +129,7 @@ jobs:
echo "##################"
echo "#### JOB INFO ####"
echo "##################"
echo "### github.event_name=${{github.event_name}} (Is this type 'schedule'""? ${{ github.event_name == 'schedule' }})"
echo "### matrix.docker.tags_schedule: ${{ matrix.docker.tags_schedule }}"
echo "### matrix.docker.tags_noschedule: ${{ matrix.docker.tags_noschedule }}"
echo "### github.event_name=${{github.event_name}}"
echo "### env.META_CONFIG: ${{ env.META_CONFIG }}"
echo "### TAGS: ${{ steps.meta.outputs.tags == '' }}"
echo "${{ steps.meta.outputs.tags }}"
Expand Down Expand Up @@ -163,7 +161,6 @@ jobs:
username: ${{ matrix.docker.username }}
password: ${{ secrets[matrix.docker.password_name] }}

# TODO FIX These builds the image multiple times (matrix)
- name: Build and push identus-mediator Image
id: push
uses: docker/build-push-action@v6
Expand Down
Loading