Skip to content

Commit

Permalink
Merge pull request #566 from kachick/trigger-when-labeled
Browse files Browse the repository at this point in the history
Trigger to deploy staging container with label
  • Loading branch information
kachick authored Apr 11, 2024
2 parents dd2f93b + 4890d1e commit 53c9c8d
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,8 @@ on:
- 'config/**'
- '!**.md'
pull_request:
paths:
- '.github/workflows/container.yml'
- 'containers/**'
- '.containerignore'
- 'flake.*'
- 'home-manager/**'
- 'config/**'
- '!**.md'
types:
- labeled
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -78,7 +72,10 @@ jobs:
group: 'deploy-container-${{ github.ref }}'
cancel-in-progress: true
needs: [get-meta, minimize-old-comments]
if: ${{ ! failure() }}
if: >-
(! failure()) &&
((github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'deploy-staging')) ||
(github.event_name != 'pull_request'))
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
Expand Down

0 comments on commit 53c9c8d

Please sign in to comment.