Skip to content

Commit

Permalink
ci: action to build binary and push it to Nexus
Browse files Browse the repository at this point in the history
  • Loading branch information
dervoeti committed Nov 6, 2024
1 parent 35863c3 commit 7f1b797
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build_binary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and push binary

on:
push:
branches:
- main

jobs:
build_image:
permissions:
id-token: write
strategy:
matrix:
runner: ["ubuntu-latest", "ubicloud-standard-8-arm"]
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Cosign
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # tag=v3.5.0
- name: Build binary
run: make cli
- name: Sign binary with cosign
run: |
cosign sign-blob -y ./bin/kubectl-kuttl --bundle=./bin/kubectl-kuttl_signature.bundle
- name: Determine Architecture
run: |
echo "ARCH=$(arch)" >> "$GITHUB_ENV"
- name: Upload signature and binary to Nexus
env:
NEXUS_USERNAME: github
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run: |
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD \
--upload-file ./bin/kubectl-kuttl \
https://repo.stackable.tech/repository/packages/kuttl/stable-${{ env.ARCH }}
curl -u $NEXUS_USERNAME:$NEXUS_PASSWORD \
--upload-file ./bin/kubectl-kuttl_signature.bundle \
https://repo.stackable.tech/repository/packages/kuttl/stable-${{ env.ARCH }}_signature.bundle

0 comments on commit 7f1b797

Please sign in to comment.