Fix oval_feed_url for ubuntu products #1245
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
--- | |
name: Gate / Kubernetes Test Content Parsing | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
datastream-parsing: | |
name: XCCDF Datastream parsing | |
runs-on: ubuntu-latest | |
steps: | |
- name: Copy XCCDF files from existing content image | |
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3 | |
with: | |
timeout_minutes: 20 | |
max_attempts: 3 | |
retry_wait_seconds: 300 | |
retry_on: error | |
command: | | |
mkdir -p content | |
docker pull ghcr.io/complianceascode/k8scontent:${{ github.event.number }} | |
docker run --rm -v $PWD/content:/content:z ghcr.io/complianceascode/k8scontent:${{ github.event.number }} bash -c "cp *.xml /content" | |
- name: Clone compliance operator repository | |
run: | | |
git clone https://github.com/ComplianceAsCode/compliance-operator.git | |
- name: Fetch go version used in compliance-operator go.mod | |
run: | | |
cd compliance-operator | |
go mod edit -json | jq -r '.Go' > go-version | |
if [ ! -s go-version ]; then | |
echo "Failed to fetch go version from compliance-operator go.mod" | |
exit 1 | |
fi | |
- name: Save go version to be used in setup-go action | |
id: save-go-version | |
run: | | |
echo "go-version=$(cat compliance-operator/go-version)" > compliance-operator/go-version | |
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5 | |
with: | |
go-version: ${{ steps.save-go-version.outputs.go-version }} | |
- name: Run ginkgo tests and check if each XCCDF file is parsed correctly | |
run: | | |
export DEFAULT_CONTENT_DS_FILE_PATH=$PWD/content | |
cd compliance-operator | |
make test-datastreams |