Wordpress Pages Update #8262
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 package version [main] | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, synchronize] | |
workflow_dispatch: | |
repository_dispatch: | |
types: [update_package_version_main] | |
concurrency: | |
group: sync_update_package_version_main | |
cancel-in-progress: true | |
jobs: | |
bump-version: # https://github.com/maks-stupak/gh-action-bump-version/blob/master/.github/workflows/push.yml | |
name: Bump Version on main branch | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: "Partially checkout source code" | |
# Fast checkout of package.json in order to bump the version number. | |
run: | | |
REPO="https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" | |
git config --global user.email [email protected] | |
git config --global user.name github-actions | |
git clone --filter=blob:none --no-checkout --depth 1 --sparse $REPO . | |
git sparse-checkout init --cone | |
git sparse-checkout add "package.json" | |
git checkout | |
- name: "cat package.json" | |
# Recommended by phips28/gh-action-bump-version (required) | |
run: cat ./package.json | |
- name: "Automated Version Bump" | |
continue-on-error: true | |
# https://github.com/phips28/gh-action-bump-version | |
# Method suggestion from https://github.com/maks-stupak/gh-action-bump-version/blob/master/.github/workflows/push.yml | |
# Bump the version number of this content package repo. | |
uses: "phips28/[email protected]" | |
with: | |
tag-prefix: '' | |
commit-message: 'Bumps main branch content package version to {{version}}.' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: "cat package.json" | |
# Recommended by phips28/gh-action-bump-version (required) | |
run: cat ./package.json | |
- name: Repository dispatch to cagov/cannabis.ca.gov [main] | |
# description: "Send signal to static site generation repo to trigger an update." | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.ODI_GITHUB_TOKEN }} | |
repository: cagov/cannabis.ca.gov | |
event-type: static_content_update_main |