Skip to content

Commit

Permalink
Login to DockerHub prior to checking out code. (#2750)
Browse files Browse the repository at this point in the history
This prevents the "Login to DockerHub" step from confusing the image tag name. At the moment the containers are incorrectly named "v1.7.0-devel-wip".
  • Loading branch information
ptodev authored Feb 18, 2025
1 parent 4c8b9e1 commit 6851421
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/publish-alloy-devel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ jobs:
runs-on:
labels: github-hosted-ubuntu-x64-large
steps:
# This step needs to run before "Checkout code".
# That's because it generates a new file.
# We don't want this file to end up in the repo directory.
# Then "tools/image-tag" would get confused because "git status" no longer reports a clean repo.
- name: Login to DockerHub (from vault)
uses: grafana/shared-workflows/actions/[email protected]

- name: Checkout code
uses: actions/checkout@v4

Expand All @@ -30,9 +37,6 @@ jobs:
go-version-file: go.mod
cache: false

- name: Login to DockerHub (from vault)
uses: grafana/shared-workflows/actions/[email protected]

- run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx create --name multiarch-alloy-alloy-devel-${GITHUB_SHA} --driver docker-container --use
Expand All @@ -45,6 +49,13 @@ jobs:
runs-on:
labels: github-hosted-ubuntu-x64-large
steps:
# This step needs to run before "Checkout code".
# That's because it generates a new file.
# We don't want this file to end up in the repo directory.
# Then "tools/image-tag" would get confused because "git status" no longer reports a clean repo.
- name: Login to DockerHub (from vault)
uses: grafana/shared-workflows/actions/[email protected]

- name: Checkout code
uses: actions/checkout@v4

Expand All @@ -60,9 +71,6 @@ jobs:
go-version-file: go.mod
cache: false

- name: Login to DockerHub (from vault)
uses: grafana/shared-workflows/actions/[email protected]

- run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx create --name multiarch-alloy-alloy-devel-boringcrypto-${GITHUB_SHA} --driver docker-container --use
Expand Down

0 comments on commit 6851421

Please sign in to comment.