From fc3e673a1944ab3fefb9458e73dd531472126bdd Mon Sep 17 00:00:00 2001 From: John Hsu Date: Tue, 16 Jul 2024 14:19:41 -0700 Subject: [PATCH] ADD github action to build the simplesamlphp image The SimpleSAMLphp SP is its own app and needs to have its own image built. This is required for the SimpleSAMLphp extension. I also updated the github action steps to their latest versions. --- .github/workflows/main.yml | 49 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c3ab3c2..5e048d5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,7 +33,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v5 with: images: ubcctlt/mediawiki # generate Docker tags based on the following events/attributes @@ -52,7 +52,7 @@ jobs: - name: Build and push id: docker_build - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} @@ -60,3 +60,48 @@ jobs: - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} + buildSimplesamlphp: + # builds and pushes the SimpleSAMLphp SP component to a separate docker hub + # repo + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_HUB_USERNAME }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: ubcctlt/mediawiki-simplesamlphp + # generate Docker tags based on the following events/attributes + tags: | + type=schedule + type=ref,event=branch + type=ref,event=pr + type=ref,event=tag + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v6 + with: + context: ./docker/simplesamlphp/sp/ + file: Dockerfile.sp + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + - name: Image digest + run: echo ${{ steps.docker_build.outputs.digest }}