Skip to content

buildx

buildx #1930

Workflow file for this run

name: buildx
on:
schedule:
- cron: "17 03 * * *"
pull_request:
push:
branches:
- master
jobs:
buildx:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.2.0
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3.7.1
with:
install: true
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Docker Buildx (build)
uses: docker/build-push-action@v6.9.0
if: success() && !contains(github.ref, 'master')
with:
push: false
build-args: REFRESHED_AT=$(date +%Y-%m-%d)
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: timbru31/node-alpine-firefox:latest
- name: Docker Login
if: success() && contains(github.ref, 'master')
uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker Buildx (push)
uses: docker/build-push-action@v6.9.0
if: success() && contains(github.ref, 'master')
with:
push: true
build-args: REFRESHED_AT=$(date +%Y-%m-%d)
platforms: linux/amd64,linux/arm64,linux/arm/v7
tags: timbru31/node-alpine-firefox:latest
- name: Inspect Image
if: always() && github.event_name != 'pull_request' && contains(github.ref, 'master')
run: |
docker buildx imagetools inspect timbru31/node-alpine-firefox:latest
- name: Clear
if: always() && github.event_name != 'pull_request'
run: |
rm -f ${HOME}/.docker/config.json