chore(deps): bump crazy-max/ghaction-import-gpg from 6 to 7 #280
Workflow file for this run
This file contains hidden or 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: build | |
| on: | |
| push: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Version to build, e.g. 0.1.0" | |
| type: string | |
| required: false | |
| env: | |
| PKG_NAME: "openbao-csi-provider" | |
| jobs: | |
| get-product-version: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| product-version: ${{ steps.get-product-version.outputs.product-version }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: get product version | |
| id: get-product-version | |
| run: | | |
| VERSION="${{ github.event.inputs.version || format('0.0.0-dev+{0}', github.sha) }}" | |
| echo "Using version ${VERSION}" | |
| echo "product-version=${VERSION}" >> $GITHUB_OUTPUT | |
| generate-metadata-file: | |
| needs: get-product-version | |
| runs-on: ubuntu-latest | |
| outputs: | |
| filepath: ${{ steps.generate-metadata-file.outputs.filepath }} | |
| steps: | |
| - name: "Checkout directory" | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Generate metadata file | |
| id: generate-metadata-file | |
| uses: hashicorp/actions-generate-metadata@v1 | |
| with: | |
| version: ${{ needs.get-product-version.outputs.product-version }} | |
| product: ${{ env.PKG_NAME }} | |
| - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: metadata.json | |
| path: ${{ steps.generate-metadata-file.outputs.filepath }} | |
| build: | |
| needs: | |
| - get-product-version | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| arch: ["arm", "arm64", "386", "amd64"] | |
| fail-fast: true | |
| name: Go linux ${{ matrix.arch }} build | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup go | |
| uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 | |
| with: | |
| go-version-file: .go-version | |
| - name: Build | |
| env: | |
| GOOS: "linux" | |
| GOARCH: ${{ matrix.arch }} | |
| run: | | |
| mkdir dist out | |
| make build | |
| zip -r -j out/${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_linux_${{ matrix.arch }}.zip dist/ | |
| - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: ${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_linux_${{ matrix.arch }}.zip | |
| path: out/${{ env.PKG_NAME }}_${{ needs.get-product-version.outputs.product-version }}_linux_${{ matrix.arch }}.zip | |
| build-docker: | |
| name: Docker ${{ matrix.arch }} build | |
| needs: | |
| - get-product-version | |
| - build | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| arch: ["arm", "arm64", "386", "amd64"] | |
| env: | |
| repo: ${{github.event.repository.name}} | |
| version: ${{needs.get-product-version.outputs.product-version}} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Docker Build (Action) | |
| uses: hashicorp/actions-docker-build@200254326a30d7b747745592f8f4d226bbe4abe4 # v2.2.0 | |
| with: | |
| version: ${{env.version}} | |
| target: default | |
| arch: ${{matrix.arch}} | |
| tags: | | |
| docker.io/hashicorp/${{env.repo}}:${{env.version}} | |
| public.ecr.aws/hashicorp/${{env.repo}}:${{env.version}} |