chore: build docker image by github actions

This commit is contained in:
2024-05-30 10:28:15 +08:00
parent 212a5c4530
commit 659ae9bfbd

42
.github/workflows/publish-docker.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: CI/CD Pipeline
on: [push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# - name: Setup Node.js environment
# uses: actions/setup-node@v4
# with:
# node-version: "18"
# - name: Install Dependencies
# run: yarn install
# - name: Build Project
# run: yarn build
- name: Docker login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.base
push: false
tags: |
yuuza/outline:${{ github.ref_name == 'main' && 'latest' || github.ref_name }}
- name: Build runner image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
yuuza/outline:${{ github.ref_name == 'main' && 'latest' || github.ref_name }}