diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4d343a33b010..118c2c44b9a7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,19 +1,14 @@ name: Build Keycloak, Create Release and Publish Docker Image on: - pull_request: + push: branches: - main - types: - - closed - workflow_dispatch: jobs: release_and_publish: - if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' + if: github.event_name == 'push' runs-on: ubuntu-latest - permissions: - contents: write steps: - uses: actions/checkout@v4 @@ -53,7 +48,7 @@ jobs: context: ./quarkus/container/ file: ./quarkus/container/Dockerfile push: true - tags: ghcr.io/${{ github.actor }}/washington:${{ steps.tag.outputs.new_tag }} + tags: ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.new_tag }} build-args: | KEYCLOAK_VERSION=${{ steps.tag.outputs.new_tag }} - ORG_NAME=${{ github.actor }} + REPOSITORY=${{ github.repository }} diff --git a/quarkus/container/Dockerfile b/quarkus/container/Dockerfile index 927a57c68e06..3b9e36a0dc24 100644 --- a/quarkus/container/Dockerfile +++ b/quarkus/container/Dockerfile @@ -1,8 +1,8 @@ FROM registry.access.redhat.com/ubi9 AS ubi-micro-build ARG KEYCLOAK_VERSION 999.0.0-SNAPSHOT -ARG ORG_NAME vunetsystems -ARG KEYCLOAK_DIST=https://github.com/$ORG_NAME/washington/releases/download/$KEYCLOAK_VERSION/keycloak-$KEYCLOAK_VERSION.tar.gz +ARG REPOSITORY vunetsystems/washington +ARG KEYCLOAK_DIST=https://github.com/$REPOSITORY/releases/download/$KEYCLOAK_VERSION/keycloak-$KEYCLOAK_VERSION.tar.gz RUN dnf install -y tar gzip zip