Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github action for pushing pgadmin image #226

Merged
merged 2 commits into from
Aug 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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