build builder image #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/#-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 }} |