Skip to content

Commit

Permalink
Merge pull request #4 from greymd/feature/actions
Browse files Browse the repository at this point in the history
Feature/actions
  • Loading branch information
greymd authored Apr 8, 2023
2 parents 504f010 + abe844c commit 3dc3acf
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/update.yml
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
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ LAST UPDATE:2023-03-19

# docker-zsh-completion
Zsh completion for [docker](http://docker.io) and [docker-compose](https://github.com/docker/compose).
Completion files on the original repositories are automatically imported to this repository every week. The batch application is running to update them (please refer to [execute.sh](/execute.sh) which is used by the batch).

Completion files on the original repositories are automatically imported to this repository every week. The schduled job is running to update them (please refer to [update.sh](.github/workflows/update.yml) which is used by the batch).

Please follow the following instructions to import completion files (After the instllation, they are registered to zsh's `fpath`).

Expand Down

0 comments on commit 3dc3acf

Please sign in to comment.