Skip to content

buildx

buildx #1395

Workflow file for this run

name: buildx
on:
schedule:
- cron: "37 09 * * *"
pull_request:
push:
branches:
- master
jobs:
buildx:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.0.0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2.2.0
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2.10.0
with:
install: true
- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Docker Buildx (build)
uses: docker/build-push-action@v4.2.1
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@v2.2.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker Buildx (push)
uses: docker/build-push-action@v4.2.1
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