Skip to content

Commit

Permalink
Update to use ghcr images
Browse files Browse the repository at this point in the history
  • Loading branch information
psibi committed Jun 18, 2023
1 parent 215d84d commit ae03067
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ jobs:
- uses: extractions/setup-just@v1
with:
just-version: 1.8.0
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/install-nix-action@v19
with:
nix_path: nixpkgs=channel:nixos-unstable
Expand Down
12 changes: 4 additions & 8 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ default:

# Build docker image
build-image:
docker image build . -f Dockerfile -t fpco/alpine-haskell-stack:{{GHC_VERSION}}
docker image build . -f Dockerfile -t ghcr.io/fpco/alpine-haskell-stack:{{GHC_VERSION}}

# Push image
push-image:
docker push fpco/alpine-haskell-stack:{{GHC_VERSION}}
docker push ghcr.io/fpco/alpine-haskell-stack:{{GHC_VERSION}}

# Build nix image
build-nix-image:
Expand All @@ -20,11 +20,7 @@ build-nix-image:
load-nix-image:
docker load < result

# Docker login
docker-login:
amber exec -- docker login --username psibi --password $DOCKER_PASSWORD

# Test image
test-image:
docker run --rm --tty fpco/alpine-haskell-stack:{{GHC_VERSION}} ghc --version
docker run --rm --tty fpco/alpine-haskell-stack:{{GHC_VERSION}} stack --version
docker run --rm --tty ghcr.io/fpco/alpine-haskell-stack:{{GHC_VERSION}} ghc --version
docker run --rm --tty ghcr.io/fpco/alpine-haskell-stack:{{GHC_VERSION}} stack --version

0 comments on commit ae03067

Please sign in to comment.