Skip to content

Add Workflows

Add Workflows #3

Workflow file for this run

---
name: Test image build
on:
pull_request:
jobs:
build-image:
name: Build image
runs-on: ubuntu-latest
steps:
# Setup QEMU for multi-arch builds
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# Adding Docker Buildx cache
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Adding docker hub login
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Adding docker build test without pushing
- name: Docker build
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: nmofonseca/nettools:latest
cache-from: type=gha
cache-to: type=gha,mode=max