Skip to content

feat: buildx not needed on CI/CD after all #128

feat: buildx not needed on CI/CD after all

feat: buildx not needed on CI/CD after all #128

Workflow file for this run

---
name: "build images"
on:
push:
branches:
- master
tags:
- "*"
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 240
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set environment
run: |
BRANCH=${GITHUB_REF#refs/heads/}
TAG=${GITHUB_REF#refs/tags/}
SUFFIX="-${BRANCH}"
if [ ${GITHUB_REF} != ${TAG} ]; then
SUFFIX="-${TAG}"
fi
if [ ${BRANCH} = "master" ]; then
SUFFIX=
fi
echo "BRANCH=${BRANCH}" >> $GITHUB_ENV
echo "SUFFIX=${SUFFIX}" >> $GITHUB_ENV
echo "TAGDATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build base
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile-base
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/taitounited/taito-cli-deps:base${{ env.SUFFIX }}
ghcr.io/taitounited/taito-cli-deps:base${{ env.SUFFIX }}-${{ env.TAGDATE }}
- name: Build cli
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile-cli
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/taitounited/taito-cli-deps:cli${{ env.SUFFIX }}
ghcr.io/taitounited/taito-cli-deps:cli${{ env.SUFFIX }}-${{ env.TAGDATE }}
- name: Build ci
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile-ci
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/taitounited/taito-cli-deps:ci${{ env.SUFFIX }}
ghcr.io/taitounited/taito-cli-deps:ci${{ env.SUFFIX }}-${{ env.TAGDATE }}
- name: Build ci-dockerd
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile-ci-dockerd
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/taitounited/taito-cli-deps:ci-dockerd${{ env.SUFFIX }}
ghcr.io/taitounited/taito-cli-deps:ci-dockerd${{ env.SUFFIX }}-${{ env.TAGDATE }}
- name: Build ci-deploy
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile-ci-deploy
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/taitounited/taito-cli-deps:ci-deploy${{ env.SUFFIX }}
ghcr.io/taitounited/taito-cli-deps:ci-deploy${{ env.SUFFIX }}-${{ env.TAGDATE }}
- name: Build ci-all
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile-ci-all
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/taitounited/taito-cli-deps:ci-all${{ env.SUFFIX }}
ghcr.io/taitounited/taito-cli-deps:ci-all${{ env.SUFFIX }}-${{ env.TAGDATE }}
- name: Build ci-aws
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile-ci-aws
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/taitounited/taito-cli-deps:ci-aws${{ env.SUFFIX }}
ghcr.io/taitounited/taito-cli-deps:ci-aws${{ env.SUFFIX }}-${{ env.TAGDATE }}
- name: Build ci-azure
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile-ci-azure
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/taitounited/taito-cli-deps:ci-azure${{ env.SUFFIX }}
ghcr.io/taitounited/taito-cli-deps:ci-azure${{ env.SUFFIX }}-${{ env.TAGDATE }}
- name: Build ci-do
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile-ci-do
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/taitounited/taito-cli-deps:ci-do${{ env.SUFFIX }}
ghcr.io/taitounited/taito-cli-deps:ci-do${{ env.SUFFIX }}-${{ env.TAGDATE }}
- name: Build ci-gcp
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile-ci-gcp
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/taitounited/taito-cli-deps:ci-gcp${{ env.SUFFIX }}
ghcr.io/taitounited/taito-cli-deps:ci-gcp${{ env.SUFFIX }}-${{ env.TAGDATE }}
- name: Build ci-openshift
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile-ci-openshift
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/taitounited/taito-cli-deps:ci-openshift${{ env.SUFFIX }}
ghcr.io/taitounited/taito-cli-deps:ci-openshift${{ env.SUFFIX }}-${{ env.TAGDATE }}
- name: Build all
uses: docker/build-push-action@v5
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: ./Dockerfile-all
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/taitounited/taito-cli-deps:all${{ env.SUFFIX }}
ghcr.io/taitounited/taito-cli-deps:all${{ env.SUFFIX }}-${{ env.TAGDATE }}