fix: remove if statements (#96)
This commit is contained in:
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -104,7 +104,6 @@ jobs:
|
||||
- name: Push To GHCR
|
||||
uses: redhat-actions/push-to-registry@v2
|
||||
id: push
|
||||
if: github.event_name != 'pull_request'
|
||||
env:
|
||||
REGISTRY_USER: ${{ github.actor }}
|
||||
REGISTRY_PASSWORD: ${{ github.token }}
|
||||
@@ -119,11 +118,9 @@ jobs:
|
||||
|
||||
# Sign container
|
||||
- uses: sigstore/cosign-installer@main
|
||||
if: github.event_name != 'pull_request'
|
||||
|
||||
# Only needed when running `cosign sign` using a key
|
||||
- name: Write signing key to disk
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
echo "${{ env.COSIGN_PRIVATE_KEY }}" > cosign.key
|
||||
# DEBUG: get character count of key
|
||||
@@ -133,14 +130,12 @@ jobs:
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
if: github.event_name != 'pull_request'
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Sign container image
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
cosign sign --key cosign.key ${{ steps.registry_case.outputs.lowercase }}/${{ env.IMAGE_NAME }}@${TAGS}
|
||||
env:
|
||||
@@ -148,12 +143,10 @@ jobs:
|
||||
COSIGN_EXPERIMENTAL: false
|
||||
|
||||
- name: Echo outputs
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
echo "${{ toJSON(steps.push.outputs) }}"
|
||||
|
||||
- name: Upload Container Export
|
||||
if: github.event_name == 'pull_request'
|
||||
run: |
|
||||
mkdir -p output
|
||||
podman save -o output/image.tar ${{ steps.build_image.outputs.image }}
|
||||
@@ -166,4 +159,3 @@ jobs:
|
||||
with:
|
||||
name: output
|
||||
path: output
|
||||
|
||||
|
||||
Reference in New Issue
Block a user