Removed pull request feature because I couldn't get it to work, shame! Now I yolo push to main
All checks were successful
Build & Publish to GHCR / build (push) Successful in 21s
All checks were successful
Build & Publish to GHCR / build (push) Successful in 21s
This commit is contained in:
parent
dc0a1fb923
commit
68d62e1f1f
@ -57,28 +57,10 @@ jobs:
|
||||
BRANCH_NAME="update-backend-api-$NEW_TAG"
|
||||
git config user.name "automation-bot"
|
||||
git config user.email "automation-bot@gansejunge.com"
|
||||
git checkout -b $BRANCH_NAME
|
||||
|
||||
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 backend-api image to version $NEW_TAG" -m "Linked build commit: $COMMIT_URL"
|
||||
git push -u origin $BRANCH_NAME
|
||||
|
||||
- name: Create Pull Request in Gitea
|
||||
working-directory: ./ops-deployment
|
||||
run: |
|
||||
NEW_TAG=${{ steps.get_tag.outputs.next }}
|
||||
BRANCH_NAME="update-backend-api-$NEW_TAG"
|
||||
COMMIT_URL="https://git.gansejunge.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}"
|
||||
curl -X POST "$GITEA_URL/api/v1/repos/$OPS_ORG/$OPS_REPO/pulls" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: token ${{ secrets.$BOT_TOKEN }}" \
|
||||
-d "{
|
||||
\"head\": \"$BRANCH_NAME\",
|
||||
\"base\": \"${{ vars.OPS_BRANCH_BASE }}\",
|
||||
\"title\": \"Update backend-api image to version $NEW_TAG\",
|
||||
\"body\": \"Automated update to backend-api image tag $NEW_TAG.\\n\\nLinked build commit: [$COMMIT_URL]($COMMIT_URL)\"
|
||||
}"
|
||||
|
||||
git push origin $OPS_BRANCH_BASE
|
||||
Loading…
x
Reference in New Issue
Block a user