Cronjob #416
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Combined Software List | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- '*' | |
- '!main' | |
# paths: | |
# - 'tags/*.yml' | |
# - 'alias.yml' | |
# - 'overwrite.yml' | |
jobs: | |
validate-yaml: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Setup Repo | |
uses: actions/checkout@v3 | |
- name: Set Git Credentials | |
run: | | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
git fetch -v --unshallow | |
git pull -v --all | |
- name: Install dependencies | |
run: | | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Validate YAML here; | |
run: echo TODO | |
- name: Generate Merged YAML | |
run: python3 .github/workflows/merge.py | |
- name: Check if changes | |
id: changes | |
run: | | |
git add --all | |
git status | |
git diff --cached --quiet && echo "There are no changes." || ( echo "There are changes" && echo "diff=true" >> $GITHUB_OUTPUT ) | |
- name: Commit to main | |
if: steps.changes.outputs.diff == 'true' | |
run: | | |
echo {{ steps.changes.outputs.diff }} | |
git commit --allow-empty -m "Automated merge" | |
git checkout main | |
git merge -X 'theirs' -v ${GITHUB_REF##*/} | |
git push -v -f origin main |