From bb79184f8ede146eff16792eeebe79c330bd9494 Mon Sep 17 00:00:00 2001 From: Paul Filion Date: Sun, 14 Jan 2024 09:38:37 -0500 Subject: [PATCH] code review --- .github/workflows/ci.yml | 2 ++ .github/workflows/docker-cicd.yml | 12 ++++++++++-- Dockerfile | 6 ++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60657169..5d91a461 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,8 @@ name: CI # This action works with pull requests and pushes on: pull_request: + branches: + - main env: # We do not need Husky hooks installed for this workflow. diff --git a/.github/workflows/docker-cicd.yml b/.github/workflows/docker-cicd.yml index 5d80468d..123c1693 100644 --- a/.github/workflows/docker-cicd.yml +++ b/.github/workflows/docker-cicd.yml @@ -58,10 +58,18 @@ jobs: - name: Log in to DO Container Registry run: doctl registry login --expiry-seconds 600 - - name: Tag image + - name: Tag image with run id run: docker tag nsgcr/netrunner-cards-json \ registry.digitalocean.com/nsgcr/netrunner-cards-json:${{ github.run_id }} + + - name: Tag image with latest + run: + docker tag nsgcr/netrunner-cards-json \ + registry.digitalocean.com/nsgcr/netrunner-cards-json:latest - - name: Push image to DO Container Registry + - name: Push run id tag to DO Container Registry run: docker push registry.digitalocean.com/nsgcr/netrunner-cards-json:${{ github.run_id }} + + - name: Push latest tag to DO Container Registry + run: docker push registry.digitalocean.com/nsgcr/netrunner-cards-json:latest diff --git a/Dockerfile b/Dockerfile index 3aec8166..25fcc3f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM alpine:3.19 -COPY . /repocontents/ +COPY ./v2/ /netrunner-cards-json/v2/ +COPY ./translations/ /netrunner-cards-json/translations/ +COPY ./cycles.json ./factions.json ./mwl.json ./packs.json ./prebuilts.json ./rotations.json ./sides.json ./types.json /netrunner-cards-json/ -ENTRYPOINT ["/bin/sh", "-c", "rm -rf /mnt/netrunner-cards-json/* && cp -r /repocontents/* /mnt/netrunner-cards-json/ && exit"] +ENTRYPOINT ["/bin/sh", "-c", "rm -rf /mnt/netrunner-cards-json/* && cp -r /netrunner-cards-json/* /mnt/netrunner-cards-json/ && exit"]