Update Plugins #18
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
# This is a basic workflow to help you get started with Actions | |
name: Update Plugins | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on sundays at 00:00 | |
schedule: | |
- cron: '0 0 * * 0' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Set the permissions of this workflow | |
permissions: | |
contents: write | |
# A workflow run is made up of one or more jobs | |
# that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "update" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks | |
# that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, | |
# so your job can access it | |
- uses: actions/checkout@v3 | |
# Clone submodules | |
- name: Clone submodules | |
run: git submodule update --init --recursive | |
# Update zsh plugins | |
- name: Update zsh plugins | |
run: git submodule update --remote --merge | |
# Push the latest changes to the main branch | |
- name: Push changes to main branch | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git diff --exit-code --quiet || git commit -am "Update plugins" | |
git push |