Compare commits
30 Commits
Author | SHA1 | Date | |
---|---|---|---|
014d8296eb | |||
8df54d0495 | |||
c0a93ea0cc | |||
6edc7790dc | |||
f2114e001b | |||
1b715c2a8d | |||
07ca3dd3a5 | |||
a333928d39 | |||
eadcddc659 | |||
ad9b1cd38d | |||
4789bb5c03 | |||
c57c660f9f | |||
2c66d6c165 | |||
cd025a9291 | |||
4f5ff56f9e | |||
728da376f7 | |||
e87401928e | |||
aa84e6e182 | |||
d2085e2305 | |||
7fefb3d53b | |||
2304d88224 | |||
2c3c115517 | |||
64191136a2 | |||
2798b4f3bd | |||
5d4bfe05de | |||
e8daa92fba | |||
f3317ba2ac | |||
ed89f99265 | |||
278a4e57e9 | |||
6e4c44e746 |
@ -8,47 +8,25 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ !startsWith(gitea.ref, 'refs/tags/v') }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- uses: peaceiris/actions-hugo@v3
|
|
||||||
with:
|
|
||||||
extended: true
|
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: resources
|
path: resources
|
||||||
key: ${{ runner.os }}-resources
|
key: ${{ runner.os }}-resources
|
||||||
|
- uses: peaceiris/actions-hugo@v3
|
||||||
|
with:
|
||||||
|
extended: true
|
||||||
- name: Build
|
- name: Build
|
||||||
run: hugo --minify
|
run: hugo --minify
|
||||||
- uses: actions/cache@v4
|
- uses: https://gitea.okami101.io/okami101/actions/docker@main
|
||||||
id: restore-build
|
|
||||||
with:
|
with:
|
||||||
path: public
|
|
||||||
key: ${{ gitea.sha }}
|
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: build
|
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- uses: actions/cache@v4
|
|
||||||
id: restore-build
|
|
||||||
with:
|
|
||||||
path: public
|
|
||||||
key: ${{ gitea.sha }}
|
|
||||||
- uses: docker/metadata-action@v5
|
|
||||||
id: meta
|
|
||||||
with:
|
|
||||||
images: ${{ vars.CONTAINER_REGISTRY_URL }}/${{ gitea.repository }}
|
|
||||||
- uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ vars.CONTAINER_REGISTRY_URL }}
|
|
||||||
username: ${{ vars.CONTAINER_REGISTRY_USERNAME }}
|
|
||||||
password: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }}
|
password: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }}
|
||||||
- uses: docker/build-push-action@v6
|
|
||||||
with:
|
deploy:
|
||||||
context: .
|
uses: https://gitea.okami101.io/okami101/actions/.gitea/workflows/release.yaml@main
|
||||||
push: true
|
secrets:
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
password: ${{ secrets.CONTAINER_REGISTRY_PASSWORD }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
|
Reference in New Issue
Block a user