Skip to content

Commit

Permalink
Fix branch checks for content publication CI/CD.
Browse files Browse the repository at this point in the history
  • Loading branch information
aj-stein-nist committed Jul 14, 2022
1 parent b97d0c0 commit b0c14d9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/content-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
types: [opened, synchronize, reopened]
workflow_dispatch:
branches:
- master
- main
name: Process Content Artifacts
env:
OSCAL_DIR_PATH: oscal
Expand All @@ -24,14 +24,14 @@ jobs:
steps:
# use this if checkout needs to be authenticated
- uses: actions/checkout@v2
if: github.repository == env.HOME_REPO && github.ref == 'refs/heads/master'
if: github.repository == env.HOME_REPO && github.ref == 'refs/heads/main'
with:
path: git-content
submodules: recursive
token: ${{ secrets.COMMIT_TOKEN }}
# use this if checkout is anonymous
- uses: actions/checkout@v2
if: github.repository != env.HOME_REPO || github.ref != 'refs/heads/master'
if: github.repository != env.HOME_REPO || github.ref != 'refs/heads/main'
with:
path: git-content
submodules: recursive
Expand Down Expand Up @@ -78,8 +78,8 @@ jobs:
run:
bash "${GITHUB_WORKSPACE}/git-content/${CICD_DIR_PATH}/copy-and-convert-content.sh" -o "${GITHUB_WORKSPACE}/git-content/${OSCAL_DIR_PATH}" -a "${GITHUB_WORKSPACE}/git-content" -c "${GITHUB_WORKSPACE}/git-content/${CONTENT_CONFIG_PATH}" -w "${GITHUB_WORKSPACE}/git-content" --resolve-profiles
- name: Publish Artifacts
# only do this on master
if: github.repository == env.HOME_REPO && github.ref == 'refs/heads/master'
# only do this on main
if: github.repository == env.HOME_REPO && github.ref == 'refs/heads/main'
uses: stefanzweifel/[email protected]
with:
repository: git-content
Expand Down

0 comments on commit b0c14d9

Please sign in to comment.