Skip to content

Commit

Permalink
feat(ci): push docker image when release is created
Browse files Browse the repository at this point in the history
  • Loading branch information
tkohr committed Jun 3, 2024
1 parent 4624644 commit 755e3fe
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
branches:
- main
pull_request:
release:
types: [created]

# Needed for nx-set-shas within nx-cloud-main.yml, when run on the main branch
permissions:
Expand Down Expand Up @@ -62,10 +64,11 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: 'Pushing the images onto ghcr.io'
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main' || github.event_name == 'release'
run: |
docker push ghcr.io/camptocamp/mel-dataplatform/catalogue:latest
docker push ghcr.io/camptocamp/mel-dataplatform/accueil:latest
TAG_NAME=${{ github.ref == 'refs/heads/main' && 'latest' || github.ref_name }}
docker push ghcr.io/camptocamp/mel-dataplatform/catalogue:$TAG_NAME
docker push ghcr.io/camptocamp/mel-dataplatform/accueil:$TAG_NAME
cypress-run:
name: End-to-end tests
Expand Down

0 comments on commit 755e3fe

Please sign in to comment.