Fix input token #6
Workflow file for this run
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
# Candace Savonen Apr 2025 | |
name: 'Build Docker Image' | |
description: 'Build and push from a dockerfile in the repository' | |
inputs: | |
directory: | |
description: "What's the file path to this Dockerfile's folder in this repo" | |
required: true | |
type: string | |
tag: | |
description: 'What is this called on Dockerhub? e.g. jhudslbase_ottr' | |
required: true | |
type: string | |
dockerhubpush: | |
description: 'Should this be pushed to Dockerhub?' | |
required: false | |
default: 'false' | |
type: string | |
token: | |
description: 'A GitHub Personal Access Token' | |
required: false | |
dockerhub_username: | |
description: 'A Dockerhub username that has access to this image' | |
required: false | |
dockerhub_token: | |
description: 'A Dockerhub token that has persmissions to push to this image' | |
required: false | |
outputs: | |
success: | |
value: ${{ steps.push.outcome }} | |
runs: | |
using: "composite" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ inputs.token }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
if: ${{ inputs.dockerhubpush != 'false' }} | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ inputs.dockerhub_username }} | |
password: ${{ inputs.dockerhub_token }} | |
- name: Build | |
id: push | |
uses: docker/build-push-action@v6 | |
with: | |
push: ${{ inputs.dockerhubpush }} | |
context: ${{ inputs.directory }} | |
file: ${{ inputs.directory }}/Dockerfile | |
platforms: linux/amd64 | |
tags: ${{ inputs.tag }} |