🧹 Bump cnspec to v11.35.0 (#347) #79
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: Release Packer Plugin | |
on: | |
push: | |
tags: | |
- "*" | |
workflow_dispatch: | |
jobs: | |
goreleaser: | |
runs-on: self-hosted | |
env: | |
RUNNER_TYPE: "self-hosted" | |
timeout-minutes: 120 | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Unshallow | |
run: git fetch --prune --unshallow | |
- name: Import environment variables from file | |
run: cat ".github/env" >> $GITHUB_ENV | |
- name: Set up Go | |
uses: actions/[email protected] | |
with: | |
go-version: ">=${{ env.golang-version }}" | |
cache: false | |
- name: Set cnspec version | |
run: echo "CNSPEC_VERSION=$(go list -json -m go.mondoo.com/cnspec/v11 | jq -r '.Version')" >> $GITHUB_ENV | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
version: latest | |
args: release --clean --timeout 120m | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
API_VERSION: x5.0 | |
CNSPEC_VERSION: ${{ env.CNSPEC_VERSION }} | |
- name: Install Github CLI (gh) | |
if: ${{ env.RUNNER_TYPE != 'self-hosted' }} | |
run: | | |
# For shared runners we install gh, for private runners its already installed | |
wget https://github.com/cli/cli/releases/download/v2.20.2/gh_2.20.2_linux_amd64.deb | |
dpkg -i gh_2.20.2_linux_amd64.deb | |
- name: Duplicate Shasum | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release download ${{github.ref_name}} --pattern '*_SHA256SUMS' | |
mv packer-plugin-cnspec_${{github.ref_name}}_SHA256SUMS packer-plugin-mondoo_${{github.ref_name}}_SHA256SUMS | |
gh release upload ${{github.ref_name}} packer-plugin-mondoo_${{github.ref_name}}_SHA256SUMS |