Skip to content

Merge remote-tracking branch 'origin/main' into cansavvy/lets-see #6

Merge remote-tracking branch 'origin/main' into cansavvy/lets-see

Merge remote-tracking branch 'origin/main' into cansavvy/lets-see #6

Workflow file for this run

# Candace Savonen Apr 2022
name: Build Docker Image
on:
workflow_call:
inputs:
directory:
required: true
type: string
tag:
required: true
type: string
dockerhubpush:
description: 'Push to Dockerhub?'
required: false
default: 'false'
type: string
secrets:
GH_PAT: ${{ secrets.GH_PAT }}
required: true

Check failure on line 21 in .github/workflows/docker-test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/docker-test.yml

Invalid workflow file

You have an error in your yaml syntax on line 21
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
defaults:
run:
working-directory: ./
jobs:
build-docker:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- 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: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build
uses: docker/build-push-action@v6
with:
push: ${{ inputs.dockerhubpush }}
context: ${{ inputs.directory }}
file: ${{ inputs.directory }}/Dockerfile
platforms: linux/amd64
tags: ${{ inputs.tag }}