File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: CI/CD Pipeline
22
33on :
44 push :
5- branches : ["main", "feature/CICD"]
5+ branches : ["main", "staging", " feature/CICD"]
66
77concurrency :
88 group : cicd-${{ github.ref_name }}
@@ -54,11 +54,11 @@ jobs:
5454 - name : Push image
5555 run : docker push "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.tag }}"
5656
57- # - name: Tag on GitHub for backup (optional)
58- # if: github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main'
59- # run: |
60- # git tag "${{ matrix.image_name }}-${{ steps.meta.outputs.tag }}" || true
61- # git push origin "${{ matrix.image_name }}-${{ steps.meta.outputs.tag }}" || true
57+ - name : Tag on GitHub for backup
58+ if : github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/feature/CICD '
59+ run : |
60+ git tag "${{ steps.meta.outputs.tag }}"
61+ git push origin "${{ steps.meta.outputs.tag }}"
6262
6363 - name : Save kubeconfig with short-lived credentials
6464 run : doctl kubernetes cluster kubeconfig save --expiry-seconds 600 "${{ env.CLUSTER_NAME }}"
You can’t perform that action at this time.
0 commit comments