feat: add GitHub Action
This commit is contained in:
parent
0c412f5bae
commit
9c850a27bc
39
.github/workflows/ci.yml
vendored
Normal file
39
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
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: PNPM Build Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: pnpm-build-cache
|
||||
key: ${{ runner.os }}-pnpm-build-cache-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
- name: inject go-build-cache into docker
|
||||
uses: reproducible-containers/buildkit-cache-dance@v2.1.3
|
||||
with:
|
||||
cache-source: pnpm-build-cache
|
||||
- name: Build And Push
|
||||
uses: docker/build-push-action@v5.1.0
|
||||
with:
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
tags: git.0x7f.app/woj/woj-ui:1.0.0
|
||||
secrets: |
|
||||
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
|
Reference in New Issue
Block a user