Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,22 @@ jobs:
echo "::set-output name=tag::$imageTag"
echo "::set-output name=repo::ghcr.io/${{ github.repository }}"
- name: Push Dev Tag
if: startsWith(github.ref, 'refs/heads/dev')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean we'll end up tagging twice if github.ref is 'refs/heads/main'?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the image job runs anyhow just for main and dev

ah, nevermind

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the job runs for both main and dev and each will create its own docker tag. For dev, it is :dev for main it is :latest and :v${currentVersion}

run: |
docker tag repo ${{ steps.tagname.outputs.repo }}:${{ steps.tagname.outputs.tag }}
docker push ${{ steps.tagname.outputs.repo }}:${{ steps.tagname.outputs.tag }}
- name: Extract version
if: startsWith(github.ref, 'refs/heads/main')
id: extract_version
run: node -pe "'::set-output name=version::' + require('./package.json').version"
- name: Push Version Tag Tag
if: startsWith(github.ref, 'refs/heads/main')
run: |
docker tag repo ${{ steps.tagname.outputs.repo }}:v{{ steps.extract_version.outputs.version }}
docker push ${{ steps.tagname.outputs.repo }}:v{{ steps.extract_version.outputs.version }}
- name: Trigger Webhook
run: |
# trigger a webhook update
curl -H "Authorization: Bearer ${{ secrets.DELPHI_DEPLOY_WEBHOOK_TOKEN }}" \
-X POST ${{ secrets.DELPHI_DEPLOY_WEBHOOK_URL }} \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "repository=${{ steps.tagname.outputs.repo }}&tag=${{ steps.tagname.outputs.tag }}"
- name: Push Version Tag Tag
if: startsWith(github.ref, 'refs/heads/main')
run: |
docker tag repo ${{ steps.tagname.outputs.repo }}:v${{ steps.extract_version.outputs.version }}
docker push ${{ steps.tagname.outputs.repo }}:v${{ steps.extract_version.outputs.version }}