From 0d5d53a2299e1e8e4b12acb6142b31da5be7926a Mon Sep 17 00:00:00 2001 From: Jean-Louis Fuchs Date: Mon, 25 Dec 2023 11:09:37 +0100 Subject: [PATCH] login on registry --- .github/workflows/testing.yml | 9 ++++++++- Makefile | 7 +++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index e6e1f33..323a997 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -18,9 +18,16 @@ jobs: - name: Checkout code uses: actions/checkout@v2 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GHCR_PAT }} + - name: Run build run: | - make up push + make pull push - name: Run tests run: | diff --git a/Makefile b/Makefile index 592979c..2b26543 100644 --- a/Makefile +++ b/Makefile @@ -7,9 +7,12 @@ help: @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort -k 1,1 | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' +.PHONY: pull +pull: ## pull cached container + @docker pull ghcr.io/adfinis/pyaptly/cache:latest + .PHONY: up -up: ## start and build container if needed - #@docker pull ghcr.io/adfinis/pyaptly/cache:latest +up: pull ## start and build container if needed @DOCKER_BUILDKIT=1 docker compose up -d --build .PHONY: push