Skip to content

Commit 419d785

Browse files
committed
Fix the docker workflow
Two issues... first, moved the docker workflow to be triggered exclusively through interactive request. The policy for automated triggering can be determined at a later time. Second, fixed a couple bugs in the docker workflow. Now that the workflow is a part of the main branch, debugging is far easier. Signed-off-by: Mic Bowman <[email protected]>
1 parent 832f89f commit 419d785

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

Diff for: .github/workflows/docker.yml

+12-9
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ name: Build and Push PDO Docker Images
77
on:
88
workflow_dispatch:
99

10-
pull_request:
11-
types: [closed]
12-
branches: [main]
10+
# pull_request:
11+
# types: [closed]
12+
# branches: [main]
1313

1414
jobs:
1515

1616
docker_build:
1717

18-
if: >
19-
github.event.name == 'workflow_dispatch' ||
20-
github.event.name == 'pull_request' && github.event.pull_request.merged == true
18+
# if: >
19+
# github.event.name == 'workflow_dispatch' ||
20+
# github.event.name == 'pull_request' && github.event.pull_request.merged == true
2121
name: Build PDO Images
2222
runs-on: ubuntu-22.04
2323

@@ -54,10 +54,13 @@ jobs:
5454
password: ${{ secrets.GITHUB_TOKEN }}
5555

5656
- name: Tag and push the images
57+
env:
58+
OWNER: ${{ github.repository_owner }}
5759
run: |
60+
echo "Push images to ghcr.io/$OWNER"
5861
for image in pdo_services pdo_ccf pdo_client
5962
do
60-
docker image tag ghcr.io/{{ github.repository_owner }}/$image:$PDO_VERSION
61-
docker image tag ghcr.io/{{ github.repository_owner }}/$image:latest
62-
docker image push --all-tags ghcr.io/{{ github.repository_owner }}/$image
63+
docker image tag $image:$PDO_VERSION ghcr.io/$OWNER/$image:$PDO_VERSION
64+
docker image tag $image:$PDO_VERSION ghcr.io/$OWNER/$image:latest
65+
docker image push --all-tags ghcr.io/$OWNER/$image
6366
done

0 commit comments

Comments
 (0)