Skip to content

Commit

Permalink
Add github action for pushing pgadmin image (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkatzz committed Aug 10, 2023
1 parent f19060e commit 941a824
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/push_pgadmin_image.yaml
Original file line number Diff line number Diff line change
@@ -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-pgdmin

0 comments on commit 941a824

Please sign in to comment.