0.6.1 #10
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: Docker Image CI | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Get the repository's code | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# https://github.com/docker/setup-qemu-action | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
# https://github.com/docker/setup-buildx-action | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Docker meta | |
id: dockeraction # you'll use this in the next step | |
uses: docker/metadata-action@v3 | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
logzio/fluent-bit-output | |
flavor: | | |
latest=false | |
# Docker tags based on the following events/attributes | |
- name: Build and push amd64 | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./test/Dockerfile.amd | |
platforms: linux/amd64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.dockeraction.outputs.tags }}-amd | |
labels: ${{ steps.dockeraction.outputs.labels }} | |
- name: Build and push amd64 latest | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./test/Dockerfile.amd | |
platforms: linux/amd64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: logzio/fluent-bit-output:latest-amd | |
labels: ${{ steps.dockeraction.outputs.labels }} | |
- name: Build and push arm64 latest | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./test/Dockerfile.arm | |
platforms: linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: logzio/fluent-bit-output:latest-arm | |
labels: ${{ steps.dockeraction.outputs.labels }} | |
- name: Build and push arm64 | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./test/Dockerfile.arm | |
platforms: linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.dockeraction.outputs.tags }}-arm | |
labels: ${{ steps.dockeraction.outputs.labels }} | |
- name: Create manifest version | |
run: | | |
docker buildx imagetools create -t ${{ steps.dockeraction.outputs.tags }} \ | |
${{ steps.dockeraction.outputs.tags }}-arm \ | |
${{ steps.dockeraction.outputs.tags }}-amd | |
- name: Create manifest latest | |
run: | | |
docker buildx imagetools create -t logzio/fluent-bit-output:latest \ | |
logzio/fluent-bit-output:latest-arm \ | |
logzio/fluent-bit-output:latest-amd |