fix: GithubActions Docker build 태그 문제 수정 #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
name: Docker Image CI | |
on: | |
push: | |
branches: [ "ci/cd" ] | |
pull_request: | |
branches: [ "ci/cd" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Build with Gradle | |
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 | |
with: | |
arguments: clean build -x test | |
# Docker build | |
- name: Docker build | |
run: | | |
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }} | |
docker build -t seongwonyoon/wabi . | |
docker tag wabi seongwonyoon/wabi:${GITHUB_SHA::7} | |
docker push seongwonyoon/wabi:${GITHUB_SHA::7} |