diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f3fd959..c73182c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -40,7 +40,7 @@ jobs: run: make push env: VERSION: latest - GH_TOKEN: ${{ steps.generate_token.outputs.token }} + AUTH: ${{ steps.generate_token.outputs.token }} - name: Test run: make test diff --git a/Makefile b/Makefile index 8c9158e..eaa2270 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ tidy: .PHONY: build build: - @if [ -z "$$VERSION" ]; then \ + @if [ -z "$(VERSION)" ]; then \ echo "VERSION is required"; \ exit 1; \ fi @@ -15,11 +15,12 @@ build: .PHONY: push push: - @if [ -z "$$VERSION" ]; then \ + @if [ -z "$(VERSION)" ]; then \ echo "VERSION is required"; \ exit 1; \ fi - docker push $(IMAGE_REPO):$$VERSION + @echo $(AUTH) | docker login ghcr.io -u snskArora --password-stdin + docker push $(IMAGE_REPO):$(VERSION) .PHONY: test test: