generated from osc/skins-template
Some checks failed
Generate Skin previews, OSK files and per skin documentation / Full CI/CD Pipeline (push) Failing after 10s
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
name: "Commit and Push Changes"
|
|
description: "Configure Git, commit changes, push to branch, and tag release"
|
|
|
|
inputs:
|
|
new_tag:
|
|
description: "The tag to create and push"
|
|
required: true
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Configure Git
|
|
shell: bash
|
|
run: |
|
|
git config user.email "arlind@sulej.ch"
|
|
git config user.name "ci-bot"
|
|
|
|
- name: Add and Commit changes
|
|
shell: bash
|
|
run: |
|
|
git config advice.addIgnoredFile false
|
|
|
|
for p in docs/ media/gameplay media/thumbnail media/panel media/icons export README.md how-to-use.md src; do
|
|
if [ -e "$p" ]; then
|
|
git add -A "$p"
|
|
fi
|
|
done
|
|
|
|
git commit -m "[ci skip] push back from pipeline" -q || echo "No changes to commit"
|
|
|
|
- name: Push changes and create tag
|
|
shell: bash
|
|
run: |
|
|
if [ "${GITHUB_REF}" = "refs/heads/main" ]; then
|
|
git push origin HEAD:main || echo "No changes to push"
|
|
git tag "${{ inputs.new_tag }}"
|
|
git push origin "${{ inputs.new_tag }}"
|
|
else
|
|
git push origin HEAD:"${GITHUB_REF_NAME}" || echo "No changes to push"
|
|
fi
|