Test buildx vs docker for cloudsmith uploads #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: buildx | |
on: | |
# Trigger the workflow on push or pull request, | |
# but only for the main branch | |
push: | |
branches: | |
- "main" | |
tags: | |
- "v*" | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest-8cpu | |
permissions: | |
contents: read # required for checkout | |
id-token: write # mint credentials through OIDC | |
packages: write | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- dockerfile: Dockerfile | |
image_name: aws-source | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Cloudsmith Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: docker.cloudsmith.io | |
username: ${{ secrets.CLOUDSMITH_SERVICE_USER }} | |
password: ${{ secrets.CLOUDSMITH_API_KEY }} | |
- name: Build and push | |
id: push | |
uses: docker/build-push-action@v5 | |
with: | |
file: build/package/${{ matrix.dockerfile }} | |
context: . | |
sbom: true | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: docker.cloudsmith.io/overmind/service/${{ matrix.image_name }}:buildx |