diff --git a/.github/workflows/release-common.yml b/.github/workflows/release-common.yml index 00a7b86..1317014 100644 --- a/.github/workflows/release-common.yml +++ b/.github/workflows/release-common.yml @@ -67,3 +67,14 @@ jobs: NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} DOCKER_REGISTRY_USER: ${{ github. actor }} DOCKER_REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish to container registry + run: | + echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin + if [ -n "$RELEASE_VERSION" ]; then + docker build . --tag ghcr.io/fhswf/bookme-backend:$RELEASE_VERSION --tag ghcr.io/fhswf/bookme-backend:latest --target backend + docker push -a ghcr.io/fhswf/bookme-backend:$RELEASE_VERSION + fi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/backend/package.json b/backend/package.json index 364a538..ad55bf2 100644 --- a/backend/package.json +++ b/backend/package.json @@ -76,19 +76,7 @@ "@semantic-release/release-notes-generator", "@semantic-release/changelog", "@semantic-release/git", - "@semantic-release/github", - [ - "@codedependant/semantic-release-docker", - { - "dockerImage": "bookme-backend", - "dockerRegistry": "ghcr.io", - "dockerFile": "../Dockerfile", - "dockerContext": "../", - "dockerBuildFlags": { - "target": "backend" - } - } - ] + "@semantic-release/github" ] }, "gitHead": "a4b1d2cc78703828c99149277115e8434b675afc"