Skip to content

Commit

Permalink
Merge pull request #10 from fpco/docker-image
Browse files Browse the repository at this point in the history
Update to use ghcr images
  • Loading branch information
psibi authored Jun 19, 2023
2 parents 215d84d + 8e3db8c commit ea42173
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
7 changes: 6 additions & 1 deletion .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 All @@ -36,5 +42,4 @@ jobs:
shell: bash
run: |
set -exuo pipefail
just docker-login
just push-image
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 ea42173

Please sign in to comment.