-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (42 loc) · 1.38 KB
/
push_pgadmin_image.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- id: file_changes
uses: tj-actions/changed-files@v45
with:
json: 'true'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- 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/cloud/aws/pgadmin
./build-pgdmin