Skip to content

Merge pull request #196 from AWS-Joe-A/main #128

Merge pull request #196 from AWS-Joe-A/main

Merge pull request #196 from AWS-Joe-A/main #128

name: CWMetricStreamExporter - Docker
on:
push:
branches: [ main ]
workflow_dispatch:
permissions:
id-token: write
contents: read
packages: write
checks: read
env:
PROJECT_DIR: ./sandbox/CWMetricStreamExporter
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Github Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: ${{ env.PROJECT_DIR }}
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:${{ github.run_number }},ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:latest