From 79dc6d2a7c8caf6cf4615745c40d1c5950c6f8eb Mon Sep 17 00:00:00 2001 From: Arnfinn Hykkerud Steindal Date: Sun, 7 Jan 2024 17:55:51 +0100 Subject: [PATCH] =?UTF-8?q?Gj=C3=B8r=20github=20action=20klar=20for=20?= =?UTF-8?q?=C3=A5=20bygge=20og=20deploye=20flere=20image=20(#24)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gjøres med matrix, tilsvarende det som er gjort på mong/mongr-dev --- .github/workflows/docker.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1d007dd..5d35c82 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -15,20 +15,25 @@ concurrency: jobs: push_to_registries: - name: Push Docker image to docker hub runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - {name: code-server} + name: ${{ matrix.config.name }} steps: - name: Check out the repo uses: actions/checkout@v4.1.1 - name: Lint Dockerfile uses: hadolint/hadolint-action@v3.1.0 with: - dockerfile: "code-server/Dockerfile" + dockerfile: "${{ matrix.config.name }}/Dockerfile" - name: Prepare tags id: docker_meta uses: docker/metadata-action@v5.4.0 with: - images: rapporteket/code-server + images: rapporteket/${{ matrix.config.name }} tags: | type=ref,event=branch type=ref,event=pr @@ -45,7 +50,7 @@ jobs: uses: docker/build-push-action@v5.1.0 with: context: . - file: ./code-server/Dockerfile + file: ./${{ matrix.config.name }}/Dockerfile push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }}