From 63e02c843f51c3422145f9765bd703c3f5489d26 Mon Sep 17 00:00:00 2001 From: dkatzz <86739416+dkatzz@users.noreply.github.com> Date: Thu, 10 Aug 2023 10:48:56 -0400 Subject: [PATCH 1/2] Create push_pgadmin_image.yaml --- .github/workflows/push_pgadmin_image.yaml | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/push_pgadmin_image.yaml diff --git a/.github/workflows/push_pgadmin_image.yaml b/.github/workflows/push_pgadmin_image.yaml new file mode 100644 index 00000000..21cad57e --- /dev/null +++ b/.github/workflows/push_pgadmin_image.yaml @@ -0,0 +1,46 @@ +name: build_push_pgadmin_image + +on: + push: + branches: + - main + # Setting this enables manually triggering workflow in the GitHub UI + # see https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow + workflow_dispatch: {} + +permissions: read-all + +# Build and push the pgadmin image. +jobs: + build_pgadmin: + runs-on: ubuntu-latest + + concurrency: + group: build-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + name: Build pgadmin + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + - id: file_changes + uses: tj-actions/changed-files@v35 + with: + json: 'true' + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Run build + id: build_and_push_pgadmin + env: + DOCKER_BUILDKIT: 1 + PLATFORM: 'linux/amd64' + DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} + if: contains(toJSON(steps.file_changes.outputs.all_changed_files), 'cloud/aws/pgadmin/') + run: | + cd $GITHUB_WORKSPACE/civiform-cloud-deploy-infra/cloud/aws/pgadmin + | ./build-pgadmin From bcf12e2b6dc02a5ca6ed5a83f7dff1522e31ef6e Mon Sep 17 00:00:00 2001 From: dkatzz <86739416+dkatzz@users.noreply.github.com> Date: Thu, 10 Aug 2023 11:07:10 -0400 Subject: [PATCH 2/2] Update push_pgadmin_image.yaml --- .github/workflows/push_pgadmin_image.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push_pgadmin_image.yaml b/.github/workflows/push_pgadmin_image.yaml index 21cad57e..28c681db 100644 --- a/.github/workflows/push_pgadmin_image.yaml +++ b/.github/workflows/push_pgadmin_image.yaml @@ -43,4 +43,4 @@ jobs: if: contains(toJSON(steps.file_changes.outputs.all_changed_files), 'cloud/aws/pgadmin/') run: | cd $GITHUB_WORKSPACE/civiform-cloud-deploy-infra/cloud/aws/pgadmin - | ./build-pgadmin + | ./build-pgdmin