From 9d8bf1131e2d1b1165ebc3d6ceda5cfe5cba0a36 Mon Sep 17 00:00:00 2001 From: Guy Owen Date: Mon, 31 Jul 2023 12:33:35 +1000 Subject: [PATCH] [DDS-1576] Added build step. --- .github/workflows/goss-tests.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/goss-tests.yml b/.github/workflows/goss-tests.yml index f8a44a2d..8a6ef817 100644 --- a/.github/workflows/goss-tests.yml +++ b/.github/workflows/goss-tests.yml @@ -14,11 +14,18 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - images: ["php-cli"] + images: ["bay-php_goss"] type: - php steps: - uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Extract Docker metadata id: meta uses: docker/metadata-action@v4.6.0 @@ -27,8 +34,25 @@ jobs: ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.images }} tags: | type=ref,event=branch + + - name: Clean ref_name + id: sanitise-ref-name + run: | + echo "SANITISED-REF-NAME=${{ github.ref_name }}" | tr '/' '-' >> "$GITHUB_OUTPUT" + + - name: Build and push + uses: docker/build-push-action@v4 + with: + push: false + context: ./images/bay-php_goss + build-args: | + BASE_IMAGE=${{ env.REGISTRY }}/${{ github.repository }}/php-cli:${{ steps.sanitise-ref-name.outputs.SANITISED-REF-NAME }} + cache-from: type=gha + cache-to: type=gha,mode=max + - name: Install Goss uses: e1himself/goss-installation-action@v1.0.3 + - name: Execute Goss tests working-directory: ./tests run: |