You've already forked reloading-manager
add automated build artifact recommit step in CI workflow
This commit is contained in:
@@ -127,15 +127,27 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "## Do not edit this file directly. It is auto-generated by the script." > argocd/deployment/deployment.yml
|
echo "## Do not edit this file directly. It is auto-generated by the script." > argocd/deployment/deployment.yml
|
||||||
sed "s|__TAG__|${{ gitea.ref_name }}|g" argocd/template/deployment.yml >> argocd/deployment/deployment.yml
|
sed "s|__TAG__|${{ gitea.ref_name }}|g" argocd/template/deployment.yml >> argocd/deployment/deployment.yml
|
||||||
#
|
|
||||||
# - name: 💾 ✅ Commit Updated Manifest
|
- name: 📤 📦 Recommit Build Artifacts
|
||||||
# uses: EndBug/add-and-commit@v9
|
uses: addnab/docker-run-action@v3
|
||||||
# with:
|
with:
|
||||||
# new_branch: release/${{ gitea.ref_name }}-deploy
|
image: alpine/git
|
||||||
# add: argocd/deployment/deployment.yml
|
options: --volumes-from ${{ env.JOB_CONTAINER_NAME }} -w ${{ gitea.workspace }}
|
||||||
# author_name: "GitHub Action 🤖"
|
run: |
|
||||||
# author_email: gitia@siteworxpro.com
|
mkdir -p ~/.ssh
|
||||||
# message: "📝 🔄 Update deployment manifest with new image tags"
|
chmod 700 ~/.ssh
|
||||||
|
ssh-keyscan -H gitea.siteworxpro.com >> ~/.ssh/known_hosts
|
||||||
|
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa
|
||||||
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
eval "$(ssh-agent -s)"
|
||||||
|
ssh-add ~/.ssh/id_rsa
|
||||||
|
git config --global user.email "gitea@siteworxpro.com"
|
||||||
|
git config --global user.name "Gitea-Runner via Gitea Actions"
|
||||||
|
git config --global push.autoSetupRemote true
|
||||||
|
git remote rm origin && git remote add origin "git@gitea.siteworxpro.com:siteworxpro/reloading-manager.git"
|
||||||
|
git add -f "argocd/deployment/*" || true
|
||||||
|
git commit -m "Build Auto Commit" || echo "No changes to commit"
|
||||||
|
git push origin HEAD:${{ gitea.ref_name }} -o ci.skip || echo "No changes to push"
|
||||||
|
|
||||||
- name: 🚀 ✨ Create Pull Request
|
- name: 🚀 ✨ Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v7
|
uses: peter-evans/create-pull-request@v7
|
||||||
|
|||||||
Reference in New Issue
Block a user