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