Merge pull request 'Github actions: Automatically update deployment configuration file' (#1) from feature/automatic-deployment into main
All checks were successful
/ build (push) Successful in 24s
All checks were successful
/ build (push) Successful in 24s
Reviewed-on: #1
This commit is contained in:
commit
519e13f045
@ -36,4 +36,26 @@ jobs:
|
||||
- name: Build and Push Docker Image
|
||||
run: |
|
||||
docker build -t ghcr.io/gansejunge/${{ env.IMAGE_NAME }}:${{ steps.get_tag.outputs.next }} .
|
||||
docker push ghcr.io/gansejunge/${{ env.IMAGE_NAME }}:${{ steps.get_tag.outputs.next }}
|
||||
docker push ghcr.io/gansejunge/${{ env.IMAGE_NAME }}:${{ steps.get_tag.outputs.next }}
|
||||
|
||||
- name: Clone ops-deployment repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: notifier/ops-deployment
|
||||
path: ./ops-deployment
|
||||
token: ${{ secrets.BOT_TOKEN }}
|
||||
|
||||
- name: Update service-docker-repository-query deployment
|
||||
working-directory: ./ops-deployment
|
||||
run: |
|
||||
NEW_TAG=${{ steps.get_tag.outputs.next }}
|
||||
NEW_IMAGE="${{ env.IMAGE_PATH }}:$NEW_TAG"
|
||||
git config user.name "automation-bot"
|
||||
git config user.email "dev@gansejunge.com"
|
||||
|
||||
sed -i "s|ghcr.io/$GHCR_ORG/$IMAGE_NAME:[0-9]\+|$NEW_IMAGE|g" "$OPS_PATH"
|
||||
|
||||
COMMIT_URL="https://git.gansejunge.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}"
|
||||
git add $OPS_PATH
|
||||
git commit -m "Update service-docker-repository-query image to version $NEW_TAG" -m "Linked build commit: $COMMIT_URL"
|
||||
git push origin $OPS_BRANCH_BASE
|
||||
Loading…
x
Reference in New Issue
Block a user