Skip to content

Docker Image CI

Docker Image CI #70

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
environment: Docker
# Define the tag once so both steps use the exact same value
env:
IMAGE_TAG: ${{ github.sha }}
steps:
- uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build the Docker image
run: docker build . --file Dockerfile --tag duylongcontainer/ui:latest --build-arg TAILSCALE_USERNAME=${{ secrets.TAILSCALE_USERNAME }} --build-arg CLOUDFLARE_API_BEAR=${{ secrets.CLOUDFLARE_API_BEAR }}
- name: Push to Dockerhub
run: docker push duylongcontainer/ui:latest