Skip to content

Commit

Permalink
GH workflow: Publish docker image when PR is labeled 'publish' (#107)
Browse files Browse the repository at this point in the history
gh workflow: publish docker image when PR is labeled 'publish'
  • Loading branch information
dandelany authored Aug 28, 2024
1 parent a53a172 commit 5b84283
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ on:
- dev-[0-9]+.[0-9]+.[0-9]+
tags:
- v*
pull_request:
types:
# publish images for PRs labeled "publish" whenever changed/labeled
[ opened, reopened, synchronize, labeled ]
workflow_dispatch:

env:
REGISTRY: ghcr.io

jobs:
publish:
# for PRs, should only publish if it has "publish" label
if: ${{ (github.event_name != 'pull_request') || contains(github.event.pull_request.labels.*.name, 'publish') }}
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ dist
files/*
node_modules
.env
.idea/

0 comments on commit 5b84283

Please sign in to comment.