Skip to content

build builder image

build builder image #5

name: build builder image
on:
workflow_dispatch:
inputs:
name:
description: "For what reason ?"
default: "Testing"
workflow_run:
workflows: [build base image]
types:
- completed
env:
IMAGE_NAME: geoflow-bundle-builder
USER_NAME: ignfab
VERSION: latest
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
# Clone project and recursively get submodules
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Login to the dockerhub registry
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./
file: ./builder.dockerfile
build-args: |
JOBS=2
VERSION=${{ env.VERSION }}
push: true
tags: ${{ env.USER_NAME }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}