feat: add GitHub Action

This commit is contained in:
Paul Pan 2023-12-31 14:12:57 +08:00
parent 0c412f5bae
commit 5ba63b770f

28
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Docker Image CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Docker Login
uses: docker/login-action@v3.0.0
with:
registry: git.0x7f.app
username: Paul
password: ${{ secrets.GITEA_DOCKER_TOKEN }}
- name: Create Sentry Env
run: echo 'SENTRY_AUTH_TOKEN="${{ secrets.SENTRY_AUTH_TOKEN }}"' > .env.sentry-build-plugin
- name: Build And Push
uses: docker/build-push-action@v5.1.0
with:
push: ${{ github.event_name != 'pull_request' }}
tags: git.0x7f.app/woj/woj-ui:1.0.0