Skip to content

Commit

Permalink
Merge pull request #291 from silinternational/config-shim-1-1-0
Browse files Browse the repository at this point in the history
Update config-shim to v1.1.0
  • Loading branch information
briskt authored Nov 25, 2024
2 parents 3163915 + 28d3dd0 commit 8d021d8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Test and Publish

on:
push:
branches: [ 'main' ] #Triger on the main branch
tags: [ '[0-9]+.[0-9]+.[0-9]+' ] # Trigger on version tags like '0.1.0'

jobs:
tests:
Expand Down Expand Up @@ -39,27 +37,35 @@ jobs:

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
if: startsWith(github.ref, 'refs/tags')
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ vars.DOCKER_ORG }}/${{ github.event.repository.name }}
ghcr.io/${{ github.repository }}
images: ${{ vars.DOCKER_ORG }}/${{ github.event.repository.name }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push Docker image
- name: Build and push Docker image to Docker Hub
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Build and push Docker image to GitHub Container Registry
uses: docker/build-push-action@v5
if: startsWith(github.ref, 'refs/tags')
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:${{ github.ref_name }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ COPY dockerbuild/config/* $SSP_PATH/config/
COPY dockerbuild/ssp-overrides/sp-php.patch sp-php.patch
RUN patch /data/vendor/simplesamlphp/simplesamlphp/modules/saml/src/Auth/Source/SP.php sp-php.patch

ADD https://github.com/silinternational/config-shim/releases/download/v1.0.0/config-shim.gz config-shim.gz
ADD https://github.com/silinternational/config-shim/releases/download/v1.1.0/config-shim.gz config-shim.gz
RUN gzip -d config-shim.gz && chmod 755 config-shim && mv config-shim /usr/local/bin

# Set permissions for cache directory. Corresponds to the `cachedir` setting in config.php.
Expand Down
2 changes: 1 addition & 1 deletion dockerbuild/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ php -v | head -n 1
if [[ -z "${APP_ID}" ]]; then
apache2ctl -k start -D FOREGROUND
else
config-shim --app $APP_ID --config $CONFIG_ID --env $ENV_ID apache2ctl -k start -D FOREGROUND
config-shim -u --strategy $STRATEGY_ID --app $APP_ID --config $CONFIG_ID --env $ENV_ID apache2ctl -k start -D FOREGROUND
fi

# endless loop with a wait is needed for the trap to work
Expand Down

0 comments on commit 8d021d8

Please sign in to comment.