ci: Changed workflow to trigger deploy after build using the commit sha in image tags
All checks were successful
build / build (push) Successful in 15s
All checks were successful
build / build (push) Successful in 15s
This commit is contained in:
parent
a5ebeff989
commit
81006d192b
3 changed files with 13 additions and 1 deletions
|
|
@ -26,6 +26,9 @@ jobs:
|
||||||
id: docker
|
id: docker
|
||||||
with:
|
with:
|
||||||
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
|
images: ${{ steps.repository.outputs.registry }}/${{ steps.repository.outputs.repository }}
|
||||||
|
tags: |
|
||||||
|
type=sha
|
||||||
|
type=ref,event=tag
|
||||||
-
|
-
|
||||||
name: Login to registry
|
name: Login to registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
name: deploy
|
name: deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: [build]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -11,6 +15,11 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Replace Image Version
|
||||||
|
runs: |
|
||||||
|
sed -i "s/###IMAGETAG###/${{ github.sha }}/g" ./EdgeConnectConfig.yaml
|
||||||
|
cat ./EdgeConnectConfig.yaml
|
||||||
|
|
||||||
- name: Deploy action
|
- name: Deploy action
|
||||||
uses: https://edp.buildth.ing/DevFW-CICD/edge-connect-deploy-action@main
|
uses: https://edp.buildth.ing/DevFW-CICD/edge-connect-deploy-action@main
|
||||||
id: deploy
|
id: deploy
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ spec:
|
||||||
volumes:
|
volumes:
|
||||||
containers:
|
containers:
|
||||||
- name: edgeconnect-coder
|
- name: edgeconnect-coder
|
||||||
image: nginx:latest
|
image: ###IMAGETAG###
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue