Skip to content

Commit

Permalink
Create docker-image workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinSRG authored Mar 29, 2023
1 parent ff0e0ff commit 64b3a4d
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Docker Image CI

on:
release:
types: [published]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag asanrom/showdown-chatbot:latest

- name: Docker Login
uses: docker/login-action@v2.1.0
with:
username: asanrom
password: ${{ secrets.DOCKER_TOKEN }}

- name: Add version tag to Docker image
run: docker tag asanrom/showdown-chatbot:latest asanrom/showdown-chatbot:$GITHUB_REF_NAME

- name: Push the Docker image (Current Version)
run: docker push asanrom/showdown-chatbot:$GITHUB_REF_NAME

- name: Push the Docker image (Latest)
run: docker push asanrom/showdown-chatbot:latest

0 comments on commit 64b3a4d

Please sign in to comment.