Skip to content

Commit

Permalink
chore: allow manual trigger of loki
Browse files Browse the repository at this point in the history
experiment to trigger these actions manually
  • Loading branch information
thegentlemanphysicist committed Feb 2, 2023
1 parent 3174397 commit 3397684
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/publish-loki.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
paths:
- helm/loki/**
- .github/workflows/publish-loki.yml
workflow_dispatch:
inputs:
environment:
description: The target environment
required: true
options: [sandbox, production]

jobs:
build-and-push-image:
Expand All @@ -23,7 +29,9 @@ jobs:
uses: ./.github/actions/setup-tools

- name: Set env to Sandbox
if: (github.ref == 'refs/heads/dev' && github.event_name == 'push')
if: |
(github.ref == 'refs/heads/dev' && github.event_name == 'push') ||
(github.event.inputs.environment == 'sandbox' && github.event_name == 'workflow_dispatch')
run: |
cat >> $GITHUB_ENV <<EOF
OPENSHIFT_TOKEN=${{ secrets.SANDBOX_OPENSHIFT_TOKEN }}
Expand All @@ -36,7 +44,9 @@ jobs:
EOF
- name: Set env to Production
if: (github.ref == 'refs/heads/main' && github.event_name == 'push')
if: |
(github.ref == 'refs/heads/main' && github.event_name == 'push') ||
(github.event.inputs.environment == 'production' && github.event_name == 'workflow_dispatch')
run: |
cat >> $GITHUB_ENV <<EOF
OPENSHIFT_TOKEN=${{ secrets.PROD_OPENSHIFT_TOKEN }}
Expand Down

0 comments on commit 3397684

Please sign in to comment.