Skip to content

Commit

Permalink
Merge pull request #8 from hydroshare/4.2.11-pg13.4
Browse files Browse the repository at this point in the history
pg13.4 fix and gh action
  • Loading branch information
devincowan authored Jul 18, 2024
2 parents 8bbd68d + 28853f9 commit 2e7929c
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
51 changes: 51 additions & 0 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build and Publish to Registry on Github push

env:
GITHUB_SHA: ${{ github.sha }}
REGISTRY_HOSTNAME: docker.io

on:
- push
- workflow_dispatch

jobs:
setup-build-publish-deploy:
name: Setup, Build, and Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Prepare
id: prep
run: |
TAG=$(echo $GITHUB_SHA | head -c7)
IMAGE="hydroshare/hs-irods"
echo ::set-output name=tagged_image::${IMAGE}:${TAG}
echo ::set-output name=tag::${TAG}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Docker Hub Login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-single-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-single-buildx
- name: Build
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.prep.outputs.tagged_image }}
cache-from: type=gha
cache-to: type=gha,mode=max
2 changes: 1 addition & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ if [[ ! -d /var/lib/irods/iRODS ]]; then
# This is the original entrypoint script to initialize the database
bash docker-entrypoint.sh postgres &
else
su postgres -c '/usr/lib/postgresql/10/bin/pg_ctl start'
su postgres -c '/usr/lib/postgresql/13/bin/pg_ctl start'
fi

### wait for database to stand up
Expand Down

0 comments on commit 2e7929c

Please sign in to comment.