Skip to content

Conversation

crazy-max
Copy link
Member

@crazy-max crazy-max commented Aug 30, 2021

Fixes #208

Try-out the composite feature which now supports uses: keyword:

  • Set up Buildx and QEMU
  • Cache
  • Metadata
  • Build and push

Usage:

name: ci

on:
  push:
    branches:
      - 'master'

jobs:
  docker:
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v2
      -
        name: Login to DockerHub
        uses: docker/login-action@v1
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Build with composite
        uses: docker/build-push-action/composite@v2
        with:
          context: .
          images: |
            user/app
          platforms: linux/amd64,linux/arm64
          push: ${{ github.event_name != 'pull_request' }}

Signed-off-by: CrazyMax crazy-max@users.noreply.github.com

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max
Copy link
Member Author

We would prefer reusable workflows for such case, see #1321

@crazy-max crazy-max closed this Mar 28, 2025
@crazy-max crazy-max deleted the composite branch March 28, 2025 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Composite Docker action
1 participant