Skip to content

Commit

Permalink
Fix the docker workflow
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
cmickeyb committed Oct 30, 2024
1 parent 832f89f commit 419d785
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ name: Build and Push PDO Docker Images
on:
workflow_dispatch:

pull_request:
types: [closed]
branches: [main]
# pull_request:
# types: [closed]
# branches: [main]

jobs:

docker_build:

if: >
github.event.name == 'workflow_dispatch' ||
github.event.name == 'pull_request' && github.event.pull_request.merged == true
# if: >
# github.event.name == 'workflow_dispatch' ||
# github.event.name == 'pull_request' && github.event.pull_request.merged == true
name: Build PDO Images
runs-on: ubuntu-22.04

Expand Down Expand Up @@ -54,10 +54,13 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Tag and push the images
env:
OWNER: ${{ github.repository_owner }}
run: |
echo "Push images to ghcr.io/$OWNER"
for image in pdo_services pdo_ccf pdo_client
do
docker image tag ghcr.io/{{ github.repository_owner }}/$image:$PDO_VERSION
docker image tag ghcr.io/{{ github.repository_owner }}/$image:latest
docker image push --all-tags ghcr.io/{{ github.repository_owner }}/$image
docker image tag $image:$PDO_VERSION ghcr.io/$OWNER/$image:$PDO_VERSION
docker image tag $image:$PDO_VERSION ghcr.io/$OWNER/$image:latest
docker image push --all-tags ghcr.io/$OWNER/$image
done

0 comments on commit 419d785

Please sign in to comment.