diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 12031eb4..bc2856d5 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -15,15 +15,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Log in to the Container registry - uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push Docker image - run: make manifest-list + run: make login manifest-list env: REGISTRY: ghcr.io/${{ github.repository }} REGISTRY_USERNAME: ${{ github.actor }} diff --git a/Makefile b/Makefile index 36e9db70..90896093 100644 --- a/Makefile +++ b/Makefile @@ -307,6 +307,11 @@ $(CONTAINER_DOTFILES): .buildx-initialized docker images -q $(REGISTRY)/$(BIN):$(TAG) > $@ echo +login: # @HELP configures docker to be authenticated to the defined registry + docker login $(REGISTRY) \ + -u "$(REGISTRY_USERNAME)" \ + -p "$(REGISTRY_PASSWORD)" + push: # @HELP pushes the container for one platform ($OS/$ARCH) to the defined registry push: container for bin in $(BINS); do \