Skip to content

Docker Release

Docker Release #2

name: Docker Release
on:
workflow_run:
workflows:
- Lint Test Build
branches:
- main
types:
- completed
jobs:
docker:
name: Build and Push to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/gocrab:latest
${{ secrets.DOCKER_USERNAME }}/gocrab:${{ github.sha }}