Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Filion committed Jan 14, 2024
1 parent 2eabd00 commit bb79184
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/docker-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit bb79184

Please sign in to comment.