Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

Commit

Permalink
fix: ops
Browse files Browse the repository at this point in the history
  • Loading branch information
vietchinh committed Nov 3, 2023
1 parent 881172e commit 38bdc87
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
uses: actions/checkout@v4

- name: Checkout Push to Registry action
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch)
if: github.event_name == 'schedule'
uses: actions/checkout@v4
with:
ref: live
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
- name: Push To GHCR
uses: redhat-actions/push-to-registry@v2
id: push
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch) && github.ref == 'refs/heads/live'
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/live'
env:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ github.token }}
Expand All @@ -185,18 +185,18 @@ jobs:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch) && github.ref == 'refs/heads/live'
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/live'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Sign container
- uses: sigstore/[email protected]
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch) && github.ref == 'refs/heads/live'
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/live'

- name: Sign container image
if: ((github.event_name == 'schedule' || github.event_name == 'workflow_dispatch) || github.event_name == 'workflow_dispatch) && github.ref == 'refs/heads/live'
if: ((github.event_name == 'schedule' || github.event_name == github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/live'
run: |
cosign sign -y --key env://COSIGN_PRIVATE_KEY ${{ steps.registry_case.outputs.lowercase }}/${{ steps.image_case.outputs.lowercase }}@${TAGS}
env:
Expand All @@ -205,6 +205,6 @@ jobs:
COSIGN_PRIVATE_KEY: ${{ secrets.SIGNING_SECRET }}

- name: Echo outputs
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch) && github.ref == 'refs/heads/live'
if: (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/live'
run: |
echo "${{ toJSON(steps.push.outputs) }}"

0 comments on commit 38bdc87

Please sign in to comment.