From f9b5ae62b5c2c5ff3a763fbde5d9984ca0497aee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Thu, 3 Oct 2024 10:15:17 +0200 Subject: [PATCH] enable login to quay.io MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Otto Kröpke --- .github/workflows/release.yml | 32 ++++++++++++++++---------------- Makefile | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 87055671e..6bcef6370 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,7 @@ jobs: run: | curl.exe -L https://github.com/moby/buildkit/releases/download/v${{ env.VERSION_BUILDKIT }}/buildkit-v${{ env.VERSION_BUILDKIT }}.windows-amd64.tar.gz -o buildkit.tar.gz tar.exe xvf buildkit.tar.gz - + .\bin\buildkitd.exe --register-service Start-Service buildkitd - name: Setup Docker Buildx @@ -75,32 +75,32 @@ jobs: - name: Build run: | $ErrorActionPreference = "Stop" - + $Version = git describe --tags --always $Version = $Version -replace 'v', '' # '+' symbols are invalid characters in image tags $Version = $Version -replace '\+', '_' $Version | Set-Content VERSION -PassThru - + make build-all - + # GH requires all files to have different names, so add version/arch to differentiate foreach($Arch in "amd64", "arm64") { Move-Item output\$Arch\windows_exporter.exe output\windows_exporter-$Version-$Arch.exe } - + Get-ChildItem -Path output - name: Build Release Artifacts run: | $ErrorActionPreference = "Stop" $Version = Get-Content VERSION - + foreach($Arch in "amd64", "arm64") { Write-Host "Building windows_exporter $Version msi for $Arch" .\installer\build.ps1 -PathToExecutable .\output\windows_exporter-$Version-$Arch.exe -Version $Version -Arch "$Arch" } - + Move-Item installer\*.msi output\ Get-ChildItem -Path output\ @@ -119,26 +119,26 @@ jobs: env: VERSION: >- ${{ - startsWith(github.ref, 'refs/tags/') && 'latest' || + startsWith(github.ref, 'refs/tags/') && 'latest' || ( github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || github.ref_name ) }} - name: Login to Docker Hub - if: ${{ github.event_name != 'pull_request' }} + #if: ${{ github.event_name != 'pull_request' }} uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_HUB_LOGIN }} password: ${{ secrets.DOCKER_HUB_PASSWORD }} - #- name: Login to quay.io - # if: ${{ github.event_name != 'pull_request' }} - # uses: docker/login-action@v3 - # with: - # registry: quay.io - # username: 'robot' - # password: ${{ secrets.QUAY_IO_API_TOKEN }} + - name: Login to quay.io + #if: ${{ github.event_name != 'pull_request' }} + uses: docker/login-action@v3 + with: + registry: quay.io + username: ${{ secrets.quay_io_login }} + password: ${{ secrets.quay_io_password }} - name: Login to GitHub container registry if: ${{ github.event_name != 'pull_request' }} diff --git a/Makefile b/Makefile index 0e55f4d86..21019d9cf 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ DOCKER_REPO ?= prometheuscommunity DOCKER_IMAGE_NAME ?= windows-exporter # ALL_DOCKER_REPOS is the list of repositories to push the image to. ghcr.io requires that org name be the same as the image repo name. -ALL_DOCKER_REPOS ?= docker.io/$(DOCKER_REPO) ghcr.io/prometheus-community # quay.io/$(DOCKER_REPO) +ALL_DOCKER_REPOS ?= docker.io/$(DOCKER_REPO) ghcr.io/prometheus-community quay.io/$(DOCKER_REPO) # Image Variables for host process Container # Windows image build is heavily influenced by https://github.com/kubernetes/kubernetes/blob/master/cluster/images/etcd/Makefile