Skip to content

Update GitHub action to use matric for image architectures #2

Update GitHub action to use matric for image architectures

Update GitHub action to use matric for image architectures #2

Workflow file for this run

name: build and push image
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- linux/amd64
- linux/arm/v6
- linux/arm/v7
- linux/arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
id: Set_up_QEMU
uses: docker/setup-qemu-action@v3.0.0
- name: Set up Docker Buildx
id: Set_up_Docker_Buildx
uses: docker/setup-buildx-action@v3.0.0
- name: Login to DockerHub
id: Login_to_DockerHub
uses: docker/login-action@v3.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: build_and_publish
uses: docker/build-push-action@v5.1.0
with:
context: .
platforms: ${{ matrix.platform }}
push: true
tags: mcdermg/gatus:latest
- uses: act10ns/slack@v2.0.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
if: always()