Skip to content

Commit

Permalink
fix path to rust injector in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
YrrepNoj committed Apr 20, 2022
1 parent 7a72199 commit b36dcfb
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/build-rust-injector.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
name: Build Rust Binary

env:
zarfInjectorPath: 'src/injector/stage1/target/x86_64-unknown-linux-musl/release/zarf-injector'

on:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -29,13 +33,13 @@ jobs:
args: cargo build --target x86_64-unknown-linux-musl --release --manifest-path src/injector/stage1/Cargo.toml

- name: "Strip The Binary Down"
run: sudo strip src/injector/stage1/target/x86_64-unknown-linux-musl/release/zarf-injector
run: sudo strip ${{ env.zarfInjectorPath }}

- name: "Upload Rust Binary"
uses: actions/upload-artifact@v2
with:
name: zarf-injector
path: src/injector/stage1/target/x86_64-unknown-linux-musl/release/zarf-injector
path: ${{ env.zarfInjectorPath }}

- name: Login to Docker Hub
uses: docker/login-action@v1
Expand All @@ -44,9 +48,10 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: "Upload Binary To DockerHub"
run: cosign upload blob -f zarf-injector defenseunicorns/zarf-injector:${{ github.event.inputs.versionTag }}
run: cosign upload blob -f ${{ env.zarfInjectorPath }} defenseunicorns/zarf-injector:${{ github.event.inputs.versionTag }}

- name: "Sign the binary"
run: cosign sign --key ${{ secrets.COSIGN_SIGNING_KEY }} defenseunicorns/zarf-injector:${{ github.event.inputs.versionTag }}
env:
COSIGN_EXPERIMENTAL: 1
# TODO: sign with an awskms key
# - name: "Sign the binary"
# run: cosign sign --key ${{ secrets.COSIGN_SIGNING_KEY }} defenseunicorns/zarf-injector:${{ github.event.inputs.versionTag }}
# env:
# COSIGN_EXPERIMENTAL: 1

0 comments on commit b36dcfb

Please sign in to comment.