Skip to content

Commit

Permalink
Enable push of Docker image to GHCR
Browse files Browse the repository at this point in the history
  • Loading branch information
surfermicha authored Mar 17, 2021
1 parent 12c1ca1 commit 3648f46
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/sonarquest-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,20 @@ jobs:
run: mvn -f ./sonarQuest-backend/pom.xml --batch-mode --update-snapshots verify
- name: Login to GitHub Container Registry
uses: docker/login-action@v1

if: github.event_name == 'release'
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2

if: github.event_name == 'release'
with:
context: ./sonarQuest-backend
push: true # Login with GitHub token at ghcr at the moment not possible. Packages must be pushed manually with PAT.
push: true
tags: |
ghcr.io/viadee/sonarquest-backend:latest
ghcr.io/viadee/sonarquest-backend:0.8.0
ghcr.io/viadee/sonarquest-backend:${{ github.event.release.tag_name }}
Expand Down Expand Up @@ -80,17 +79,18 @@ jobs:
npm test
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
if: github.event_name == 'release'
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
if: github.event_name == 'release'
with:
context: ./sonarQuest-frontend
push: true # Login with GitHub token at ghcr at the moment not possible. Packages must be pushed manually with PAT.
push: true
tags: |
ghcr.io/viadee/sonarquest-frontend:latest
ghcr.io/viadee/sonarquest-backend:0.8.0
ghcr.io/viadee/sonarquest-frontend:${{ github.event.release.tag_name }}

0 comments on commit 3648f46

Please sign in to comment.