diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2f30587..69457d6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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 @@ -36,5 +42,4 @@ jobs: shell: bash run: | set -exuo pipefail - just docker-login just push-image diff --git a/justfile b/justfile index e8e2ad4..b3cfc32 100644 --- a/justfile +++ b/justfile @@ -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: @@ -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