Skip to content

Commit 8d021d8

Browse files
authored
Merge pull request #291 from silinternational/config-shim-1-1-0
Update config-shim to v1.1.0
2 parents 3163915 + 28d3dd0 commit 8d021d8

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

.github/workflows/test-and-publish.yml

+16-10
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: Test and Publish
22

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

86
jobs:
97
tests:
@@ -39,27 +37,35 @@ jobs:
3937

4038
- name: Log in to GitHub Container Registry
4139
uses: docker/login-action@v3
40+
if: startsWith(github.ref, 'refs/tags')
4241
with:
43-
registry: ghcr.io
44-
username: ${{ github.actor }}
45-
password: ${{ secrets.GITHUB_TOKEN }}
42+
registry: ghcr.io
43+
username: ${{ github.actor }}
44+
password: ${{ secrets.GITHUB_TOKEN }}
4645

4746
- name: Extract metadata (tags, labels) for Docker
4847
id: meta
4948
uses: docker/metadata-action@v5
5049
with:
51-
images: |
52-
${{ vars.DOCKER_ORG }}/${{ github.event.repository.name }}
53-
ghcr.io/${{ github.repository }}
50+
images: ${{ vars.DOCKER_ORG }}/${{ github.event.repository.name }}
5451
tags: |
5552
type=ref,event=branch
5653
type=semver,pattern={{version}}
5754
type=semver,pattern={{major}}.{{minor}}
58-
59-
- name: Build and push Docker image
55+
56+
- name: Build and push Docker image to Docker Hub
6057
uses: docker/build-push-action@v5
6158
with:
6259
context: .
6360
push: true
6461
tags: ${{ steps.meta.outputs.tags }}
6562
labels: ${{ steps.meta.outputs.labels }}
63+
64+
- name: Build and push Docker image to GitHub Container Registry
65+
uses: docker/build-push-action@v5
66+
if: startsWith(github.ref, 'refs/tags')
67+
with:
68+
context: .
69+
push: true
70+
tags: ghcr.io/${{ github.repository }}:${{ github.ref_name }}
71+
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ COPY dockerbuild/config/* $SSP_PATH/config/
4747
COPY dockerbuild/ssp-overrides/sp-php.patch sp-php.patch
4848
RUN patch /data/vendor/simplesamlphp/simplesamlphp/modules/saml/src/Auth/Source/SP.php sp-php.patch
4949

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

5353
# Set permissions for cache directory. Corresponds to the `cachedir` setting in config.php.

dockerbuild/run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ php -v | head -n 1
2323
if [[ -z "${APP_ID}" ]]; then
2424
apache2ctl -k start -D FOREGROUND
2525
else
26-
config-shim --app $APP_ID --config $CONFIG_ID --env $ENV_ID apache2ctl -k start -D FOREGROUND
26+
config-shim -u --strategy $STRATEGY_ID --app $APP_ID --config $CONFIG_ID --env $ENV_ID apache2ctl -k start -D FOREGROUND
2727
fi
2828

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

0 commit comments

Comments
 (0)