Skip to content

devops: fixed the auto-push-docker workflow, correct docker hub #3

devops: fixed the auto-push-docker workflow, correct docker hub

devops: fixed the auto-push-docker workflow, correct docker hub #3

Workflow file for this run

name: Create Docker Images
# Create Docker images tagged based off commit
on:
workflow_call:
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
# workflow_dispatch:
push:
# branches:
# - 'master'
# pull_request:
# branches:
# - 'master'
jobs:
build_search:
name: Building Search Docker Image
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker metadata
id: metadata
uses: docker/metadata-action@v3
with:
images: ${{ env.IMG_NAME }}
tags: |
type=raw,value={{sha}},enable=${{ github.ref_type != 'tag' }}
- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: search/
file: ./Dockerfile
push: true
labels: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

Check failure on line 47 in .github/workflows/push-docker.yml

View workflow run for this annotation

GitHub Actions / Create Docker Images

Invalid workflow file

The workflow is not valid. .github/workflows/push-docker.yml (Line: 47, Col: 11): 'labels' is already defined