Skip to content

Commit

Permalink
Rename jobs and add authentication for registries
Browse files Browse the repository at this point in the history
  • Loading branch information
ianpittwood committed Apr 10, 2024
1 parent 52f1557 commit 6cdbbf1
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/build-bake-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
name: Preview - Build, Test, and Push
jobs:
build-preview:
name: Build, Test, and Push Preview images
runs-on: ubuntu-latest-4x

concurrency:
Expand Down Expand Up @@ -39,6 +40,19 @@ jobs:
with:
buildkitd-config: ./share/buildkitd.toml

- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- uses: actions/setup-python@v5
with:
python-version: '3.12'
Expand Down
61 changes: 60 additions & 1 deletion .github/workflows/build-bake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
name: Release - Build, Test, and Push
jobs:
build:
name: Build and Test images
name: Build, Test, and Push images
runs-on: ubuntu-latest-4x

concurrency:
Expand All @@ -33,6 +33,51 @@ jobs:
with:
buildkitd-config: ./share/buildkitd.toml

- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Login to GCAR us-central1
continue-on-error: true
uses: docker/login-action@v3
with:
registry: us-central1-docker.pkg.dev
username: _json_key
password: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}'

- name: Login to GCAR us
continue-on-error: true
uses: docker/login-action@v3
with:
registry: us-docker.pkg.dev
username: _json_key
password: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}'

- name: Login to GCAR asia
continue-on-error: true
uses: docker/login-action@v3
with:
registry: asia-docker.pkg.dev
username: _json_key
password: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}'

- name: Login to GCAR europe
continue-on-error: true
uses: docker/login-action@v3
with:
registry: europe-docker.pkg.dev
username: _json_key
password: '${{ secrets.GCP_ARTIFACT_REGISTRY_JSON }}'

- name: Build
id: build
uses: docker/bake-action@v4
Expand All @@ -59,6 +104,7 @@ jobs:
push: true

build-content:
name: Build content images
runs-on: ubuntu-latest-4x

concurrency:
Expand All @@ -74,6 +120,19 @@ jobs:
with:
buildkitd-config: ./share/buildkitd.toml

- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build
id: build
uses: docker/bake-action@v4
Expand Down

0 comments on commit 6cdbbf1

Please sign in to comment.