Skip to content

Update GitHub Actions to v4 #6

Update GitHub Actions to v4

Update GitHub Actions to v4 #6

Workflow file for this run

name: "Build and Publish Builder Bolos Image"
on:
workflow_dispatch:
push:
paths:
- "src/*"
- ".github/workflows/publishZondax.yml"
jobs:
build_zondax:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Git commit hash
id: hash
run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Set up QEMU # to build multitarget containers
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build image
uses: docker/build-push-action@v4
with:
context: src
platforms: linux/amd64,linux/arm64
push: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' }}
tags: zondax/builder-bolos:${{ steps.hash.outputs.hash }},zondax/builder-bolos:latest