Build and publish containers #6
This file contains hidden or 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: Build and publish containers | |
on: | |
workflow_dispatch: | |
inputs: | |
semver: | |
description: 'SEMVER to set on the release' | |
required: true | |
type: string | |
permissions: | |
contents: write | |
packages: write | |
jobs: | |
build-ci-image: | |
runs-on: ubuntu-latest | |
env: | |
SEMVER: ${{ inputs.semver }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
# GITHUB_TOKEN is automatically provided in GitHub Actions | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up QEMU (for multi-arch builds, optional) | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./hack | |
file: ./hack/Dockerfile.ci | |
push: true | |
tags: | | |
ghcr.io/devlabfoundry/aws-cli-auth-ci:${{ inputs.semver }} | |
platforms: linux/amd64,linux/arm64 # adjust as needed |