Skip to content

Merge pull request #113 from metrico/feat/arm64-support #61

Merge pull request #113 from metrico/feat/arm64-support

Merge pull request #113 from metrico/feat/arm64-support #61

Workflow file for this run

name: Docker Build ghcr
on:
push:
branches:
- main
paths-ignore:
- '**.md'
env:
REGISTRY: ghcr.io
jobs:
tag_bump:
runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.tag_bump.outputs.new_tag }}
steps:
- uses: actions/checkout@v2
- id: tag_bump
name: Bump version and push tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: patch
RELEASE_BRANCHES: main
PRERELEASE: true
build:
needs: tag_bump
runs-on: ${{ matrix.runner }}
strategy:
matrix:
platform: [ amd64, arm64 ]
include:
- platform: amd64
runner: ubuntu-latest
- platform: arm64
runner: ARM64
steps:
- uses: actions/checkout@v2
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: platform_suffix
run: |
if [ "${{ matrix.platform }}" == "arm64" ]; then
echo "PLATFORM_SUFFIX=-arm64" >> $GITHUB_ENV
else
echo "PLATFORM_SUFFIX=" >> $GITHUB_ENV
fi
- name: Docker meta
id: meta
uses: docker/[email protected]
with:
images: |
ghcr.io/metrico/qryn-otel-collector
tags: |
latest${{ env.PLATFORM_SUFFIX }}
${{ needs.tag_bump.outputs.new_tag }}${{ env.PLATFORM_SUFFIX }}
- name: Build and push
uses: docker/[email protected]
with:
context: .
file: ./cmd/otel-collector/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}