Create docker-deploy.yml

This commit is contained in:
2024-02-18 13:37:11 -05:00
committed by GitHub
parent 5d8f975820
commit 2859d6cf6b

29
.github/workflows/docker-deploy.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Docker Build and Push
on:
release:
types: [published]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push Docker image
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
RELEASE_VERSION: ${{ github.event.release.tag_name }}
run: |
docker build -t joshnotwright/nhlscoreboard .
docker tag joshnotwright/nhlscoreboard:latest joshnotwright/nhlscoreboard:${RELEASE_VERSION}
docker tag joshnotwright/nhlscoreboard:latest joshnotwright/nhlscoreboard:latest
docker push joshnotwright/nhlscoreboard:${RELEASE_VERSION}
docker push joshnotwright/nhlscoreboard:latest