Bump actions/upload-artifact from 4.3.1 to 4.3.2 #547
Workflow file for this run
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
on: | |
push: | |
branches: | |
- main | |
- develop | |
paths: | |
- 'src/**' | |
- 'oscal' | |
pull_request: | |
types: [opened, synchronize, reopened] | |
workflow_dispatch: | |
name: Process Content Artifacts | |
env: | |
HOME_REPO: usnistgov/oscal-content | |
# With the default GEN_CONTENT_DIR, the resulting catalogs, profiles, and | |
# other example content will end up in the build/generated directory. For | |
# checking in finalized content, it goes into build/.., the top-level | |
# directory of this project. | |
GEN_CONTENT_DIR: .. | |
jobs: | |
validate-and-publish-content: | |
name: Check, Convert and Validate Content | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 | |
if: github.repository != env.HOME_REPO || github.ref != 'refs/heads/main' | |
with: | |
submodules: recursive | |
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 | |
if: github.repository == env.HOME_REPO && github.ref == 'refs/heads/main' | |
with: | |
submodules: recursive | |
token: ${{ secrets.COMMIT_TOKEN }} | |
- name: Install xmllint | |
run: sudo apt-get install -y libxml2-utils | |
- name: Cache generated content for OSCAL build artifacts | |
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 | |
with: | |
path: | | |
build/oscal/build/node_modules | |
build/oscal/build/generated | |
# See https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache | |
key: | | |
${{ hashFiles('build/oscal/build/**') }} | |
- name: Copy and convert content | |
run: | | |
make -j2 -C build all GEN_CONTENT_DIR=${{env.GEN_CONTENT_DIR}} | |
id: copy-convert | |
- name: Zip Artifacts for Upload | |
if: always() | |
run: | | |
zip ${{ runner.temp }}/generated-content.zip -r README.md examples/ nist.gov/ | |
working-directory: ${{ github.workspace }} | |
- uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba | |
if: always() | |
with: | |
name: generated-content | |
path: | | |
${{ runner.temp }}/generated-content.zip | |
retention-days: 5 | |
- name: Publish Artifacts | |
if: github.repository == env.HOME_REPO && github.ref == 'refs/heads/main' | |
uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d | |
with: | |
push_options: --force | |
commit_message: Publishing auto-converted artifacts [skip ci] | |
commit_user_name: OSCAL GitHub Actions Bot | |
commit_user_email: oscal@nist.gov | |
commit_author: OSCAL GitHub Actions Bot <oscal@nist.gov> |