-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from greymd/feature/actions
Feature/actions
- Loading branch information
Showing
2 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
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 |
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