Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag tonypai/summary-gpt-bot:$(echo $GITHUB_REF | rev | cut -d/ -f1 | rev) | ||
|
||
- name: Docker login | ||
run: docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Push Docker image | ||
run: | | ||
TAG_NAME=$(echo $GITHUB_REF | rev | cut -d/ -f1 | rev) | ||
docker push tonypai/summary-gpt-bot:$TAG_NAME | ||
docker tag tonypai/summary-gpt-bot:$TAG_NAME tonypai/summary-gpt-bot:latest | ||
docker push tonypai/summary-gpt-bot:latest |