Skip to content

Commit e49c4ce

Browse files
authored
Merge pull request #63 from arbisoft/release-based-deployments
feat: trigger deployment workflow when release published
2 parents 14d5ff3 + c598b53 commit e49c4ce

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/build-and-push-container-image.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
22
name: Build/Push/Deploy Container Image
33
on:
4-
push:
5-
branches:
6-
- main
4+
release:
5+
types: [published]
76
workflow_dispatch:
87

98
jobs:
@@ -33,7 +32,7 @@ jobs:
3332
GID=${{ secrets.APP_USER_GID }}
3433
target: app
3534
push: true
36-
tags: ${{ secrets.CONTAINER_IMAGE_REPO }}/session-portal-backend:${{ github.sha }}, ${{ secrets.CONTAINER_IMAGE_REPO }}/session-portal-backend:latest
35+
tags: ${{ secrets.CONTAINER_IMAGE_REPO }}/session-portal-backend:${{ github.ref_name }}, ${{ secrets.CONTAINER_IMAGE_REPO }}/session-portal-backend:latest
3736

3837
- name: Create Temporary Deployment Token
3938
uses: actions/[email protected]
@@ -59,5 +58,5 @@ jobs:
5958
repo: process.env.REPO,
6059
workflow_id: process.env.WORKFLOW_ID,
6160
ref: 'main',
62-
inputs: { 'backend_version': '${{ github.sha }}' }
61+
inputs: { 'backend_version': '${{ github.ref_name }}' }
6362
});

0 commit comments

Comments
 (0)