Skip to content

Commit b84298f

Browse files
committed
docker-login against dind within devcontainer instead of dockerd running on GitHub Actions VM
1 parent 5abee54 commit b84298f

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/build-and-publish.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,6 @@ jobs:
7474
- name: Set up Docker Buildx
7575
uses: docker/setup-buildx-action@v3
7676

77-
- name: Log in to Container Registry
78-
uses: docker/login-action@v3
79-
with:
80-
registry: ${{ env.REGISTRY }}
81-
username: ${{ github.actor }}
82-
password: ${{ secrets.GITHUB_TOKEN }}
83-
8477
- name: Extract architecture for build
8578
id: arch
8679
run: |
@@ -129,11 +122,17 @@ jobs:
129122
env:
130123
BUILDKIT_PROGRESS: plain
131124
DOCKER_BUILDKIT: 1
125+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126+
REGISTRY: ${{ env.REGISTRY }}
127+
GITHUB_ACTOR: ${{ github.actor }}
132128
with:
133129
subFolder: .
134130
env: |
135131
BUILDKIT_PROGRESS=plain
136132
DOCKER_BUILDKIT=1
133+
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
134+
REGISTRY=${{ env.REGISTRY }}
135+
GITHUB_ACTOR=${{ github.actor }}
137136
runCmd: |
138137
echo "=== Building connector for architecture: ${{ steps.arch.outputs.airbyte_arch }} ==="
139138
echo "Target image tag: ${{ steps.tags.outputs.primary_tag }}"
@@ -143,6 +142,9 @@ jobs:
143142
echo "Available disk space: $(df -h /)"
144143
echo "Docker version: $(docker --version)"
145144
145+
echo "=== Logging into Container Registry ==="
146+
echo "$GITHUB_TOKEN" | docker login "$REGISTRY" -u "$GITHUB_ACTOR" --password-stdin
147+
146148
echo "=== Running airbyte-ci build ==="
147149
# Setup development environment (clone Airbyte repo and copy connector)
148150
make setup-dev

0 commit comments

Comments
 (0)