Skip to content

Added solution for 2023/Day 24 #114

Added solution for 2023/Day 24

Added solution for 2023/Day 24 #114

Workflow file for this run

name: Postprocess
on:
push:
branches: ["master"]
workflow_dispatch:
concurrency:
group: "postprocess"
cancel-in-progress: false
jobs:
postprocess:
name: Postprocess
runs-on: ubuntu-latest
if: ${{ github.event.head_commit.committer.username != 'github-actions[bot]' }}
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 2 # To be able to `commit --amend`
token: ${{ secrets.GH_PAT }}
- name: Get changed files
if: github.event_name == 'push'
id: changed-files
uses: tj-actions/changed-files@v40
with:
write_output_files: true
json: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: pip
# cache-dependency-path: .github/requirements.txt
- name: Install Python dependencies
working-directory: .github
run: pip install -r requirements.txt
- name: Install Python dependencies for solutions
run: find . -name "requirements.txt" -type f -exec pip install -r '{}' ';'
- name: Run postprocess
working-directory: .github/src
run: python postprocess.py
- name: Delete temporary files
run: rm -rf .github/outputs
- name: Get last commit message and author
id: last-commit
run: |
echo "message=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
echo "author=$(git log -1 --pretty=\"%an <%ae>\")" >> $GITHUB_OUTPUT
- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_options: --amend
push_options: --force
skip_fetch: true
commit_message: ${{ steps.last-commit.outputs.message }}
commit_user_name: GitHub Actions
commit_author: ${{ steps.last-commit.outputs.author }}