Skip to content

build: cd를 위한 latest tag 푸쉬 #5

build: cd를 위한 latest tag 푸쉬

build: cd를 위한 latest tag 푸쉬 #5

Workflow file for this run

name: Docker Image CI
on:
push:
branches: ['main']
jobs:
build:
runs-on: ubuntu-latest
env:
DOCKER_HUB_REPO: ${{ secrets.DOCKER_HUB_REPO }}
steps:
- uses: actions/checkout@v4
- name: Login Dockerhub
env:
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
run: echo "$DOCKER_HUB_TOKEN" | docker login --username $DOCKER_HUB_REPO --password-stdin
- name: auto increment tag
id: tag
uses: sophiware/actions-auto-increment-tag@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build the Docker image
run: docker build . --file Dockerfile --tag $DOCKER_HUB_REPO/add-be:${{ steps.tag.outputs.tag }}
- name: push to docker hub repository
run: docker push $DOCKER_HUB_REPO/add-be:${{ steps.tag.outputs.tag }}
run: docker push $DOCKER_HUB_REPO/add-be:latest

Check failure on line 32 in .github/workflows/docker-ci.yml

View workflow run for this annotation

GitHub Actions / Docker Image CI

Invalid workflow file

The workflow is not valid. .github/workflows/docker-ci.yml (Line: 32, Col: 9): 'run' is already defined