Skip to content

Wordpress Pages Update #20975

Wordpress Pages Update

Wordpress Pages Update #20975

name: Update package version [staging]
on:
push:
branches:
- staging
pull_request:
types: [opened, synchronize]
workflow_dispatch:
repository_dispatch:
types: [update_package_version_staging]
concurrency:
group: sync_update_package_version_staging
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 staging branch
runs-on: ubuntu-20.04
steps:
- name: "Checkout source code (staging)"
uses: "actions/checkout@v2"
with:
ref: staging
# jbum: this code breaks on staging branch. checkouts should be significantly faster now
# since we've dropped media folder
#
# - 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 staging
# 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 staging 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 [staging]
# 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_staging