|
2 | 2 | # SPDX-License-Identifier: Apache-2.0
|
3 | 3 | #
|
4 | 4 |
|
| 5 | +# This workflow will generate docker images for the |
| 6 | +# current branch and push those images into the |
| 7 | +# repository owners resources. |
| 8 | + |
5 | 9 | name: Build and Push PDO Docker Images
|
6 | 10 |
|
7 | 11 | on:
|
8 | 12 | workflow_dispatch:
|
9 | 13 |
|
10 |
| - pull_request: |
11 |
| - types: [closed] |
12 |
| - branches: [main] |
| 14 | + # This section is commented out for the moment until a |
| 15 | + # reasonable policy is determined for automated generation. |
| 16 | + # The conditional execution must be evaluated as well. These |
| 17 | + # are left here to serve as potential documentation for how |
| 18 | + # the policy may be implemented. |
| 19 | + |
| 20 | + # pull_request: |
| 21 | + # types: [closed] |
| 22 | + # branches: [main] |
13 | 23 |
|
14 | 24 | jobs:
|
15 | 25 |
|
16 | 26 | docker_build:
|
17 | 27 |
|
18 |
| - if: > |
19 |
| - github.event.name == 'workflow_dispatch' || |
20 |
| - github.event.name == 'pull_request' && github.event.pull_request.merged == true |
| 28 | + # if: > |
| 29 | + # github.event.name == 'workflow_dispatch' || |
| 30 | + # github.event.name == 'pull_request' && github.event.pull_request.merged == true |
21 | 31 | name: Build PDO Images
|
22 | 32 | runs-on: ubuntu-22.04
|
23 | 33 |
|
@@ -54,10 +64,13 @@ jobs:
|
54 | 64 | password: ${{ secrets.GITHUB_TOKEN }}
|
55 | 65 |
|
56 | 66 | - name: Tag and push the images
|
| 67 | + env: |
| 68 | + OWNER: ${{ github.repository_owner }} |
57 | 69 | run: |
|
| 70 | + echo "Push images to ghcr.io/$OWNER" |
58 | 71 | for image in pdo_services pdo_ccf pdo_client
|
59 | 72 | 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 |
| 73 | + docker image tag $image:$PDO_VERSION ghcr.io/$OWNER/$image:$PDO_VERSION |
| 74 | + docker image tag $image:$PDO_VERSION ghcr.io/$OWNER/$image:latest |
| 75 | + docker image push --all-tags ghcr.io/$OWNER/$image |
63 | 76 | done
|
0 commit comments