Skip to content

Commit

Permalink
Merge pull request #228 from anchore/release-updates
Browse files Browse the repository at this point in the history
ci: add back fixed release checks
  • Loading branch information
bradleyjones authored May 30, 2024
2 parents 3db48ea + cbae0c1 commit d22d830
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,31 @@ jobs:
git fetch origin main
git merge-base --is-ancestor ${GITHUB_REF##*/} origin/main && echo "${GITHUB_REF##*/} is a commit on main!"
- name: Check static analysis
uses: fountainhead/action-wait-for-check@5a908a24814494009c4bb27c242ea38c93c593be #v1.2.0
id: static-analysis
with:
token: ${{ secrets.GITHUB_TOKEN }}
# This check name is defined as the github actions job name (in .github/workflows/static-analysis-integration.yaml)
checkName: "Static-Analysis (1.22.x, ubuntu-latest)"
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Check unit, and integration test results
uses: fountainhead/action-wait-for-check@5a908a24814494009c4bb27c242ea38c93c593be #v1.2.0
id: tests-unit-int
with:
token: ${{ secrets.GITHUB_TOKEN }}
# This check name is defined as the github actions job name (in .github/workflows/static-analysis-integration.yaml)
checkName: "Tests (1.22.x, ubuntu-latest)"
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Quality gate
if: steps.static-analysis.outputs.conclusion != 'success' || steps.tests-unit-int.outputs.conclusion != 'success'
run: |
echo "Static-Analysis Status : ${{ steps.static-analysis.outputs.conclusion }}"
echo "Unit/Integration Status : ${{ steps.tests-unit-int.outputs.conclusion }}"
false
release:
needs: [ wait-for-checks ]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -71,3 +96,4 @@ jobs:
with:
name: artifacts
path: dist/**/*

34 changes: 32 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ changelog:
dockers:
- image_templates:
- "anchore/k8s-inventory:latest"
- "anchore/k8s-inventory:{{ .Tag }}-amd64"
- "anchore/k8s-inventory:v{{ .Major }}-amd64"
- "anchore/k8s-inventory:v{{ .Major }}.{{ .Minor }}-amd64"
dockerfile: Dockerfile
Expand All @@ -80,9 +79,22 @@ dockers:
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"
skip_push: auto

- image_templates:
- "anchore/k8s-inventory:{{ .Tag }}-amd64"
dockerfile: Dockerfile
use: buildx
ids:
- generic
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=BUILD_DATE={{.Date}}"
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"

- image_templates:
- "anchore/k8s-inventory:{{ .Tag }}-arm64v8"
- "anchore/k8s-inventory:v{{ .Major }}-arm64v8"
- "anchore/k8s-inventory:v{{ .Major }}.{{ .Minor }}-arm64v8"
goarch: arm64
Expand All @@ -96,6 +108,21 @@ dockers:
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"
skip_push: auto

- image_templates:
- "anchore/k8s-inventory:{{ .Tag }}-arm64v8"
goarch: arm64
dockerfile: Dockerfile
use: buildx
ids:
- generic
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--build-arg=BUILD_DATE={{.Date}}"
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"

- image_templates:
- "anchore/k8s-inventory:{{ .Tag }}-fips-amd64"
Expand All @@ -109,6 +136,7 @@ dockers:
- "--build-arg=BUILD_VERSION={{.Version}}"
- "--build-arg=VCS_REF={{.FullCommit}}"
- "--build-arg=VCS_URL={{.GitURL}}"
skip_push: auto

docker_manifests:
- name_template: anchore/k8s-inventory:{{ .Tag }}
Expand All @@ -120,6 +148,7 @@ docker_manifests:
- anchore/k8s-inventory:{{ .Tag }}-arm64v8
- anchore/k8s-inventory:v{{ .Major }}-arm64v8
- anchore/k8s-inventory:v{{ .Major }}.{{ .Minor }}-arm64v8
skip_push: auto
- name_template: anchore/k8s-inventory:latest
image_templates:
- anchore/k8s-inventory:{{ .Tag }}-amd64
Expand All @@ -129,4 +158,5 @@ docker_manifests:
- anchore/k8s-inventory:{{ .Tag }}-arm64v8
- anchore/k8s-inventory:v{{ .Major }}-arm64v8
- anchore/k8s-inventory:v{{ .Major }}.{{ .Minor }}-arm64v8
skip_push: auto

0 comments on commit d22d830

Please sign in to comment.