Add bind-tools #27
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: Build 📦 | |
on: | |
push: | |
# branches: | |
# - '*' | |
tags: | |
- 'v*.*.*' | |
env: | |
buildah_format: "docker" | |
#IMAGE_TAG: ${{ github.sha }} | |
REGISTRY: docker.io | |
REPOSITORY: docker.io/containerscrew/infratools | |
jobs: | |
build: | |
name: Build image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v4 | |
# For multiarch | |
- name: Install qemu dependency | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y qemu-user-static buildah | |
# Step to set Docker tag based on the generated GitHub tag | |
- name: Set container tag | |
id: set_tag | |
run: | | |
# Extract the tag name from the full reference | |
IMAGE_TAG=$(echo "${{ github.ref }}" | sed 's|.*/||') | |
echo "IMAGE_TAG=$IMAGE_TAG" >> "$GITHUB_ENV" | |
- name: Buildah login docker.io | |
run: | | |
buildah login -u ${{ secrets.DOCKERHUB_AUTH_USERNAME }} -p ${{ secrets.DOCKERHUB_AUTH_TOKEN }} docker.io | |
# You can also use official github action from redhat: redhat-actions/buildah-build@v2 | |
- name: Buildah multiarch | |
run: | | |
buildah manifest create multiarch | |
buildah bud --jobs=0 --layers --arch amd64 --manifest multiarch --format=docker -f Containerfile . | |
buildah bud --jobs=0 --layers --arch arm64 --manifest multiarch --format=docker -f Containerfile . | |
buildah manifest push --all localhost/multiarch docker://$REPOSITORY:$IMAGE_TAG | |
buildah manifest rm localhost/multiarch | |
buildah logout $REGISTRY |