-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modularize and standardize GitHub Actions workflows.
- Loading branch information
1 parent
20ebbee
commit 93296f0
Showing
7 changed files
with
57 additions
and
33 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
version: 2 | ||
updates: | ||
|
||
- package-ecosystem: "gitsubmodule" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
|
||
- package-ecosystem: "docker" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
|
||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
|
||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ jobs: | |
# use this for builds triggered from the UI on protected branches | ||
- name: Checkout Latest (using COMMIT_TOKEN) | ||
if: github.event_name == 'workflow_dispatch' && github.event.inputs.commit_resources == 'true' | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #current tag: v3 | ||
with: | ||
path: ${{ env.CHECKOUT_PATH }} | ||
token: ${{ secrets.COMMIT_TOKEN }} | ||
|
@@ -54,7 +54,7 @@ jobs: | |
# use this for builds triggered from other workflows on protected branches | ||
- name: Checkout Latest (using access_token) | ||
if: github.event_name == 'push' && inputs.commit_resources == true | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #current tag: v3 | ||
with: | ||
path: ${{ env.CHECKOUT_PATH }} | ||
token: ${{ secrets.access_token }} | ||
|
@@ -63,21 +63,21 @@ jobs: | |
# use this for overything else (i.e., pull requests) where publication is not needed | ||
- name: Checkout Latest | ||
if: steps.checkout_latest_workflow.conclusion == 'skipped' && steps.checkout_latest_push.conclusion == 'skipped' | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #current tag: v3 | ||
with: | ||
path: ${{ env.CHECKOUT_PATH }} | ||
submodules: recursive | ||
# Setup runtime environment | ||
# ------------------------- | ||
# Java JDK 11 | ||
- name: Set up JDK | ||
uses: actions/setup-java@v2 | ||
uses: actions/setup-java@f0bb91606209742fe3ea40199be2f3ef195ecabf #current tag: v2 | ||
with: | ||
java-version: 11 | ||
distribution: 'temurin' | ||
cache: 'maven' | ||
- name: Set up NodeJS | ||
uses: actions/setup-node@v2 | ||
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 #current-tag: v2 | ||
with: | ||
node-version-file: '${{ env.CHECKOUT_PATH }}/build/.nvmrc' | ||
cache: 'npm' | ||
|
@@ -121,7 +121,7 @@ jobs: | |
run: | | ||
zip ${{ runner.temp }}/metaschema-artifacts.zip -r xml/schema/*.xsd json/schema/*.json xml/convert/*.xsl json/convert/*.xsl | ||
working-directory: ${{ env.CHECKOUT_PATH }} | ||
- uses: actions/upload-artifact@v2 | ||
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 #current tag: v3 | ||
with: | ||
name: schemas-and-converters | ||
path: | | ||
|
@@ -132,13 +132,9 @@ jobs: | |
- name: Publish Schemas and Converters | ||
# only do this on master | ||
if: github.event.inputs.commit_resources == 'true' || inputs.commit_resources == true | ||
uses: stefanzweifel/[email protected] | ||
uses: stefanzweifel/git-auto-commit-action@be7095c202abcf573b09f20541e0ee2f6a3a9d9b #current tag: v4.9.2 | ||
with: | ||
repository: ${{ env.CHECKOUT_PATH }} | ||
file_pattern: xml json | ||
# push_options: --force-with-lease | ||
skip_dirty_check: false | ||
commit_message: Publishing generated metaschema resources [ci skip] | ||
# commit_user_name: OSCAL GitHub Actions Bot | ||
# commit_user_email: [email protected] | ||
# commit_author: OSCAL GitHub Actions Bot <[email protected]> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,15 +74,15 @@ jobs: | |
# 2) The target branch where the metaschemas exist that are the basis of reference information. | ||
# Checkout the current branch for reading | ||
- name: Checkout Latest | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #current tag: v3 | ||
with: | ||
path: ${{ env.BRANCH_PATH }} | ||
submodules: recursive | ||
fetch-depth: 0 # this ensures that the tag and commit history are available | ||
# use this for builds triggered from the UI on protected branches | ||
- name: Checkout Main (using COMMIT_TOKEN) | ||
if: github.event_name == 'workflow_dispatch' && github.event.inputs.commit_resources == 'true' | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #current tag: v3 | ||
with: | ||
path: ${{ env.MAIN_PATH }} | ||
ref: ${{ env.MAIN_BRANCH_REF }} | ||
|
@@ -92,7 +92,7 @@ jobs: | |
# use this for builds triggered from other workflows on protected branches | ||
- name: Checkout Main (using access_token) | ||
if: github.event_name == 'push' && inputs.commit_resources == true | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #current tag: v3 | ||
with: | ||
path: ${{ env.MAIN_PATH }} | ||
ref: ${{ env.MAIN_BRANCH_REF }} | ||
|
@@ -102,7 +102,7 @@ jobs: | |
# use this for overything else (i.e., pull requests) where publication is not needed | ||
- name: Checkout Main | ||
if: steps.checkout_main_workflow.conclusion == 'skipped' && steps.checkout_main_push.conclusion == 'skipped' | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #current tag: v3 | ||
with: | ||
path: ${{ env.MAIN_PATH }} | ||
ref: ${{ env.MAIN_BRANCH_REF }} | ||
|
@@ -111,7 +111,7 @@ jobs: | |
# ------------------------- | ||
# Java JDK 11 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
uses: actions/setup-java@f0bb91606209742fe3ea40199be2f3ef195ecabf #current tag: v2 | ||
with: | ||
java-version: 11 | ||
distribution: 'temurin' | ||
|
@@ -159,7 +159,7 @@ jobs: | |
run: | | ||
zip ${{ runner.temp }}/metaschema-website.zip -r public/ | ||
working-directory: ${{ env.MAIN_PATH }}/docs | ||
- uses: actions/upload-artifact@v2 | ||
- uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 #current tag: v3 | ||
with: | ||
name: website | ||
path: | | ||
|
@@ -168,7 +168,7 @@ jobs: | |
- name: Publish Generated Pages | ||
# only do this on master | ||
if: github.event.inputs.commit_resources == 'true' || inputs.commit_resources == true | ||
uses: stefanzweifel/[email protected] | ||
uses: stefanzweifel/git-auto-commit-action@be7095c202abcf573b09f20541e0ee2f6a3a9d9b #current tag: v4.9.2 | ||
with: | ||
repository: ${{ env.MAIN_PATH }} | ||
file_pattern: docs | ||
|
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 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 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