Skip to content

Commit

Permalink
feat: docker build in release
Browse files Browse the repository at this point in the history
  • Loading branch information
cgawron committed Sep 10, 2023
1 parent 891bb01 commit a2e1c1f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/release-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
14 changes: 1 addition & 13 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a2e1c1f

Please sign in to comment.