-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added github worflow for release image
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Main Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
test: | ||
name: Publish image to ghcr on release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
# - name: test | ||
# run: | | ||
# cp CI/ESS/docker-compose.gitlab.yaml docker-compose.yaml | ||
# docker-compose down --remove-orphans | ||
# docker-compose pull | ||
# docker-compose up --build --exit-code-from scicat-backend | ||
# docker-compose down | ||
|
||
- name: Login to GHCR | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
tags: ghcr.io/scicatproject/backend-next:${{ github.event.release.tag_name }},ghcr.io/scicatproject/backend-next:latest-release,ghcr.io/scicatproject/backend-next:alfa-stable |