Skip to content

Commit ebc9917

Browse files
authored
Update docker-publish.yml
Do not build docker images for [WIP] or in 'draft'
1 parent bddbd0b commit ebc9917

File tree

1 file changed

+14
-31
lines changed

1 file changed

+14
-31
lines changed

.github/workflows/docker-publish.yml

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,22 @@ on:
88
tags:
99
- v*
1010

11-
# Run tests for any PRs.
12-
# pull_request:
13-
14-
# steps:
15-
# - uses: actions/checkout@v2
16-
# Setup mysqlserver.
17-
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
1811
jobs:
19-
mysql57:
12+
mysql57:
13+
runs-on: ubuntu-latest
14+
if: github.event_name != 'pull_request' || (github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'WIP'))
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Shutdown existing MySQL
18+
run: sudo service mysql stop
19+
20+
push_to_registries:
2021
runs-on: ubuntu-latest
22+
if: github.event_name != 'pull_request' || (github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'WIP'))
23+
permissions:
24+
packages: write
25+
contents: read
2126
steps:
22-
- uses: actions/checkout@v2
23-
- name: Shutdown existing MySQL
24-
run: sudo service mysql stop
25-
26-
27-
push_to_registries:
28-
#- name: Push Docker image to multiple registries
29-
runs-on: ubuntu-latest
30-
permissions:
31-
packages: write
32-
contents: read
33-
steps:
3427
- name: Set up MySQL
3528
uses: cweinberger/github-actions-mysql@main
3629
with:
@@ -62,13 +55,6 @@ jobs:
6255
with:
6356
username: ${{ secrets.DOCKER_USERNAME }}
6457
password: ${{ secrets.DOCKER_PASSWORD }}
65-
# username: curtishall
66-
# password: ${{ secrets.DOCKER_PASSWORD }}
67-
# - name: Extract metadata (tags, labels) for Docker
68-
# id: meta
69-
# uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
70-
# with:
71-
# images: bluecherrydvr/bluecherry
7258

7359
- name: Extract metadata (tags, labels) for Docker
7460
id: meta
@@ -81,9 +67,6 @@ jobs:
8167
with:
8268
#working-directory: server/
8369
context: "{{defaultContext}}:actions"
84-
# username: curtishall
85-
# password: ${{ secrets.DOCKER_PASSWORD }}
86-
# file: ./server/Dockerfile
8770
push: true
8871
tags: ${{ steps.meta.outputs.tags }}
89-
labels: ${{ steps.meta.outputs.labels }}
72+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)