47 lines
1.5 KiB
YAML
47 lines
1.5 KiB
YAML
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: true
|
|
tags: |
|
|
yuuza/outline-base:${{ github.ref_name == 'main' && 'latest' || github.ref_name }}
|
|
cache-from: type=registry,ref=yuuza/outline-base:${{ github.ref_name == 'main' && 'latest' || github.ref_name }}
|
|
cache-to: type=inline
|
|
- run: docker tag yuuza/outline-base:${{ github.ref_name == 'main' && 'latest' || github.ref_name }} outlinewiki/outline-base:latest
|
|
- 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 }}
|
|
cache-from: type=registry,ref=yuuza/outline:${{ github.ref_name == 'main' && 'latest' || github.ref_name }}
|
|
cache-to: type=inline
|