Update #84
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: Update | |
on: | |
schedule: | |
- cron: "0 13 * * 0" # 13:00 UTC every Sunday | |
jobs: | |
update: | |
name: Cronjob based github action | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Import changes | |
shell: bash | |
run: | | |
: "Get docker/cli" && { | |
_path="docker/cli/master/contrib/completion/zsh/_docker" | |
mkdir -p "$(dirname ${_path})" | |
curl -L "https://raw.githubusercontent.com/$_path" > "$_path" | |
} | |
: "Get docker/compose" && { | |
_path="docker/compose/master/contrib/completion/zsh/_docker-compose" | |
mkdir -p "$(dirname ${_path})" | |
curl -L "https://raw.githubusercontent.com/$_path" > "$_path" | |
} | |
- name: Update date | |
shell: bash | |
run: | | |
# Keepalive here since GitHub will suspend the scheduled trigger for GitHub action workflows | |
# if there is no commit in the repository for the past 60 days. | |
sed -i -E 's/^(LAST UPDATE:).*$/\1'$(date +%F)'/' README.md | |
- uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: auto_commit | |
branch: master |