Skip to content

Commit

Permalink
login on registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Louis Fuchs committed Dec 25, 2023
1 parent a45c18c commit 4d095af
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,24 @@ on:
jobs:
build:
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run build
run: |
make up push
make up
- name: Run tests
run: |
Expand Down
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
.DEFAULT_GOAL := help

COMPOSE_DOCKER_CLI_BUILD = 1
DOCKER_BUILDKIT = 1
export COMPOSE_DOCKER_CLI_BUILD
export DOCKER_BUILDKIT

# Help target extracts the double-hash comments from the targets and shows them
# in a convenient way. This allows us to easily document the user-facing Make
# targets
.PHONY: help
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
@env | grep DOCKER
@DOCKER_BUILDKIT=1 docker compose up -d --build

.PHONY: push
Expand Down

0 comments on commit 4d095af

Please sign in to comment.