Convert CI to Github Actions #2
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 | |
on: | |
pull_request: | |
push: | |
tags: | |
- "*" | |
branches: | |
- main | |
permissions: | |
packages: write | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-tags: true | |
- name: Set up Docker | |
uses: docker/setup-docker@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: USERNAME | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Docker Image | |
run: make build | |
- name: Push Docker Image | |
if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' | |
run: make push | |
- name: Push Latest Docker Image | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
run: make push-latest |