Skip to content

Build & Push

Build & Push #4

Workflow file for this run

name: Build & Push
on:
workflow_dispatch:
workflow_run:
workflows: ["Snyk Scan"]
types:
- completed
env:
IMAGE_NAME: nodejs-goof
PLATFORM: linux-arm64
jobs:
build:
name: Build and push
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
tags: linux-arm64
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/arm64
tags: "${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ env.PLATFORM }}"
cache-from: type=gha
cache-to: type=gha,mode=max