This commit is contained in:
@@ -39,16 +39,6 @@ jobs:
|
||||
${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.APP }}:${{ steps.tag.outputs.sha }}
|
||||
${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.APP }}:latest
|
||||
|
||||
- name: Build and push backend image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
target: backend
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.APP }}-tina:${{ steps.tag.outputs.sha }}
|
||||
${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.APP }}-tina:latest
|
||||
|
||||
- name: Update image tags in gitops repo
|
||||
env:
|
||||
CI_TOKEN: ${{ secrets.CI_TOKEN }}
|
||||
@@ -63,10 +53,7 @@ jobs:
|
||||
sed -i \
|
||||
"s|image: ${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.APP }}:.*|image: ${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.APP }}:${SHA}|" \
|
||||
"apps/${{ env.APP }}/deployment.yaml"
|
||||
sed -i \
|
||||
"s|image: ${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.APP }}-tina:.*|image: ${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.APP }}-tina:${SHA}|" \
|
||||
"apps/${{ env.APP }}/tina-backend-deployment.yaml"
|
||||
git add "apps/${{ env.APP }}/deployment.yaml" "apps/${{ env.APP }}/tina-backend-deployment.yaml"
|
||||
git add "apps/${{ env.APP }}/deployment.yaml"
|
||||
git diff --cached --quiet && echo "No changes, skipping commit." && exit 0
|
||||
git commit -m "ci: update ${{ env.APP }} to ${SHA}"
|
||||
git push origin main
|
||||
|
||||
Reference in New Issue
Block a user