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
# This workflow builds docker images and pushes them to a Docker Hub Repository | |
# This workflow is specific to the podman-notebook directory and image | |
# Set the workflow name | |
name: JHub Podman Build Test | |
# Define the trigger that starts the action | |
# For this workflow the trigger is on a push that changes anything in the images/podman-notebook/ path | |
on: | |
push: | |
paths: | |
- podman-notebook/** | |
# Define the actions that are going to take place as part of this workflow | |
jobs: | |
build-image: | |
# Use the latest ubuntu image to run the jobs | |
runs-on: arc-runner-set | |
steps: | |
# Step 1 is to checkout the github repo used to build the Dockerfile | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
# Step 2 is to login to docker hub so the image can be pushed | |
# Get the date and send to GITHUB_OUTPUT to apply as image tag | |
- name: Get current date | |
id: date | |
run: echo "date=$(date +'%Y-%m-%d.%H')" >> $GITHUB_OUTPUT | |
# Build and push the docker image | |
- name: Build Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
# Provide the current directory as build context | |
context: . | |
# Specify where the Dockerfile is located in relation to the repo base path | |
file: Containerfile | |
# Enable the push to docker hub | |
push: false | |
# Provide the tags to apply to the image, this example uses the latest image tag | |
tags: | | |
ncote/nbviz2cntnr:${{ steps.date.outputs.date }} |