Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinAbro321 authored Oct 16, 2024
2 parents bf8e7d3 + 56e48d4 commit 7a80916
Show file tree
Hide file tree
Showing 36 changed files with 209 additions and 182 deletions.
10 changes: 0 additions & 10 deletions .github/actions/golang/action.yaml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/check-go-mod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Test go mod
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/nightly-ecr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Build the Zarf binary
run: make build-cli-linux-amd
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/nightly-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Build binary and zarf packages
uses: ./.github/actions/packages
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
fetch-depth: 0

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Install tools
uses: ./.github/actions/install-tools
Expand Down Expand Up @@ -84,7 +86,7 @@ jobs:

# Upload the contents of the build directory for later stages to use
- name: Upload build artifacts
uses: actions/upload-artifact@84480863f228bb9747b473957fcc9e309aa96097 # v4.4.2
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: build-artifacts
path: build/
Expand All @@ -107,7 +109,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Make Zarf executable
run: |
Expand Down Expand Up @@ -140,7 +144,9 @@ jobs:
fetch-depth: 0

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Install tools
uses: ./.github/actions/install-tools
Expand Down Expand Up @@ -198,7 +204,7 @@ jobs:
HOMEBREW_TAP_GITHUB_TOKEN: ${{ steps.brew-tap-token.outputs.token }}

- name: Save CVE report
uses: actions/upload-artifact@84480863f228bb9747b473957fcc9e309aa96097 # v4.4.2
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: cve-report
path: build/zarf-known-cves.csv
8 changes: 5 additions & 3 deletions .github/workflows/scan-codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
uses: github/codeql-action/init@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql.yaml
Expand All @@ -52,6 +54,6 @@ jobs:
run: make build-cli-linux-amd

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
uses: github/codeql-action/analyze@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
with:
category: "/language:${{matrix.language}}"
4 changes: 3 additions & 1 deletion .github/workflows/scan-docs-and-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Docs and schemas
run: "make test-docs-and-schema"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@84480863f228bb9747b473957fcc9e309aa96097 # v4.4.2
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@c36620d31ac7c881962c3d9dd939c40ec9434f2b # v3.26.12
uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
with:
sarif_file: results.sarif
26 changes: 19 additions & 7 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Build binary and zarf packages
uses: ./.github/actions/packages
Expand All @@ -47,7 +49,7 @@ jobs:

# Upload the contents of the build directory for later stages to use
- name: Upload build artifacts
uses: actions/upload-artifact@84480863f228bb9747b473957fcc9e309aa96097 # v4.4.2
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: build-artifacts
path: build/
Expand All @@ -67,7 +69,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Make Zarf executable
run: |
Expand Down Expand Up @@ -102,7 +106,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Setup K3d
uses: ./.github/actions/k3d
Expand Down Expand Up @@ -144,7 +150,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Make Zarf executable
run: |
Expand Down Expand Up @@ -182,7 +190,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Setup Kind
run: |
Expand Down Expand Up @@ -226,7 +236,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Setup Minikube
run: minikube start --driver=docker
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test-external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Build binary and zarf packages
uses: ./.github/actions/packages
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test-import.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: 'go.mod'
cache: true
go-version-file: go.mod

- name: Run test Go program that imports Zarf
run: |
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/test-package-create.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Test Package Create Checksums

on:
pull_request:
merge_group:

permissions:
contents: read

concurrency:
group: package-create-${{ github.ref }}
cancel-in-progress: true

jobs:
test-checksums:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod

- name: Build Zarf
run: make build

- name: Build examples
run: make build-examples ARCH=amd64

- name: Compare checksums
run: |
set -e
for f in hack/examples-checksums/*.txt
do
NAME=$(basename $f .txt)
CHECKSUM=$(tar Oxf build/$NAME.tar.zst checksums.txt | grep -v sboms.tar)
EXPECTED_CHECKSUM=$(cat $f | grep -v sboms.tar)
if [[ "$CHECKSUM" != "$EXPECTED_CHECKSUM" ]]
then
echo "Package $f does not have expected checksum."
echo "$CHECKSUM"
echo "-----"
echo "$EXPECTED_CHECKSUM"
exit 1
fi
done
4 changes: 3 additions & 1 deletion .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Run unit tests
run: make test-unit
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/test-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ jobs:
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Build PR binary and zarf init package
uses: ./.github/actions/packages
Expand All @@ -46,7 +48,7 @@ jobs:

# Upload the contents of the build directory for later stages to use
- name: Upload build artifacts
uses: actions/upload-artifact@84480863f228bb9747b473957fcc9e309aa96097 # v4.4.2
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: build-artifacts
path: build/
Expand All @@ -66,7 +68,9 @@ jobs:
path: build/

- name: Setup golang
uses: ./.github/actions/golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Make Zarf executable
run: |
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ jobs:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Run Windows unit tests
run: make test-unit
shell: pwsh
Expand All @@ -46,6 +51,11 @@ jobs:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup golang
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: go.mod

- name: Build Windows binary and zarf packages
uses: ./.github/actions/packages
with:
Expand Down
9 changes: 0 additions & 9 deletions examples/dos-games/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ components:
- manifests/service.yaml
images:
- ghcr.io/zarf-dev/doom-game:0.0.1
actions:
onDeploy:
after:
- wait:
cluster:
kind: deployment
name: game
namespace: dos-games
condition: available

# YAML keys starting with `x-` are custom keys that are ignored by the Zarf CLI
# The `x-mdx` key is used to render the markdown content for https://docs.zarf.dev/ref/examples
Expand Down
Loading

0 comments on commit 7a80916

Please sign in to comment.