mirror of
https://github.com/splunk/security_content
synced 2026-06-08 17:32:49 +00:00
Branch was auto-updated.
This commit is contained in:
@@ -4,13 +4,46 @@ on:
|
||||
workflows: ["validate-and-build"]
|
||||
types: [completed]
|
||||
|
||||
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
#Check that the validate-and-build workflow succeeded
|
||||
check-validate-and-build-success:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check Failure
|
||||
run: |
|
||||
if ${{ github.event.workflow_run.conclusion == 'success' }} ; then
|
||||
echo "SUCCESS: validate-and-build.yml ran successfully. Continue"
|
||||
exit 0
|
||||
else
|
||||
echo "FAIL: validate-and-build.yml DID NOT run successfully. Terminating..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
#Enusre that we are running on a tag. There is no good way to see if this was
|
||||
#triggered from a tag/release, so we use the creation of an aritifact in the
|
||||
#validate-and-build workflow to represent it
|
||||
verify-tag:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Restore Content-Pack Artifacts for AppInspect testing
|
||||
uses: dawidd6/action-download-artifact@v2
|
||||
with:
|
||||
workflow: validate-and-build.yml
|
||||
workflow_conclusion: success
|
||||
name: tag-canary
|
||||
path: .
|
||||
run: |
|
||||
#If this file does not exist, then cat will return a nonzero status (failure)
|
||||
#and the entire workflow will fail
|
||||
cat tag-canary.txt
|
||||
|
||||
run-appinspect:
|
||||
runs-on: ubuntu-latest
|
||||
#Only run when tagged
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') && github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
|
||||
- name: Checkout Repo
|
||||
@@ -80,7 +113,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [run-appinspect]
|
||||
#Only run when tagged
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') && github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v2
|
||||
@@ -127,7 +159,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [run-appinspect, create-report]
|
||||
#Only run when tagged
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') && github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
|
||||
- name: Checkout Repo
|
||||
@@ -222,7 +253,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [run-appinspect, create-report, update-sources-github]
|
||||
#Only run when tagged
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') && github.event.workflow_run.conclusion == 'success' }}
|
||||
|
||||
steps:
|
||||
|
||||
#Get the artifacts that we need
|
||||
@@ -271,7 +302,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [run-appinspect, create-report, update-sources-github, publish-github-release]
|
||||
#Only run when tagged
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') && github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
|
||||
- uses: dawidd6/action-download-artifact@v2
|
||||
@@ -299,7 +329,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [run-appinspect, create-report, update-sources-github, publish-github-release, attack-range-update]
|
||||
#Only run when tagged
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') && github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
@@ -250,6 +250,7 @@ jobs:
|
||||
cp upload/DA-ESS_AmazonWebServices_Content-*tar.gz DA-ESS_AmazonWebServices_Content-latest.tar.gz
|
||||
sha256sum DA-ESS_AmazonWebServices_Content-latest.tar.gz >> checksum.txt
|
||||
|
||||
touch tag-canary.txt
|
||||
- name: store_artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
@@ -263,4 +264,12 @@ jobs:
|
||||
path: |
|
||||
build/DA-ESS-ContentUpdate-latest.tar.gz
|
||||
build/DA-ESS_AmazonWebServices_Content-latest.tar.gz
|
||||
build/checksum.txt
|
||||
build/checksum.txt
|
||||
|
||||
#Store the tag to indicate that this was a tagged build
|
||||
- name: store_artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: tag-canary
|
||||
path: |
|
||||
tag-canary.txt
|
||||
Reference in New Issue
Block a user