Skip to content

logzio-fluentd-1.5.2 #6

logzio-fluentd-1.5.2

logzio-fluentd-1.5.2 #6

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
with:
driver-opts: |
image=moby/buildkit:v0.11.6
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: public.ecr.aws
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- 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: |
public.ecr.aws/logzio/logzio-fluentd
flavor: |
latest=false
# Docker tags based on the following events/attributes
- name: Build and push amd64
uses: docker/build-push-action@v2
with:
context: .
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@v2
with:
context: .
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: public.ecr.aws/logzio/logzio-fluentd:latest-amd
labels: ${{ steps.dockeraction.outputs.labels }}
- name: Build and push arm64 latest
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile.arm
platforms: linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: public.ecr.aws/logzio/logzio-fluentd:latest-arm
labels: ${{ steps.dockeraction.outputs.labels }}
- name: Build and push arm64
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile.arm
platforms: linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.dockeraction.outputs.tags }}-arm
labels: ${{ steps.dockeraction.outputs.labels }}
- name: Create version
run: |
docker buildx imagetools create -t ${{ steps.dockeraction.outputs.tags }} \
${{ steps.dockeraction.outputs.tags }}-arm \
${{ steps.dockeraction.outputs.tags }}-amd
- name: Create latest
run: |
docker buildx imagetools create -t public.ecr.aws/logzio/logzio-fluentd:latest \
public.ecr.aws/logzio/logzio-fluentd:latest-arm \
public.ecr.aws/logzio/logzio-fluentd:latest-amd