This commit is contained in:
parent
2d35fbba62
commit
1ad980266b
@ -19,7 +19,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 22.x
|
node-version: 22.x
|
||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
- uses: https://gitea.com/actions/go-hashfiles@v0.0.1
|
- name: Hash files for cache
|
||||||
|
uses: https://gitea.com/actions/go-hashfiles@v0.0.1
|
||||||
id: get-hash
|
id: get-hash
|
||||||
with:
|
with:
|
||||||
patterns: |-
|
patterns: |-
|
||||||
@ -31,49 +32,43 @@ jobs:
|
|||||||
- name: Get yarn cache directory path
|
- name: Get yarn cache directory path
|
||||||
id: yarn-cache-dir-path
|
id: yarn-cache-dir-path
|
||||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||||
|
- run: echo "a=$(hashFiles('**/yarn.lock'))"
|
||||||
|
# - uses: actions/cache@v4
|
||||||
|
# id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||||
|
# with:
|
||||||
|
# path: |
|
||||||
|
# ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
|
# ${{ github.workspace }}/.next/cache
|
||||||
|
# key: ${{ runner.os }}-yarn-${{ steps.get-hash.outputs.hash }}
|
||||||
|
# restore-keys: |
|
||||||
|
# ${{ runner.os }}-yarn-
|
||||||
|
# - run: yarn
|
||||||
|
# - run: EXPORT=1 UNOPTIMIZED=1 yarn build
|
||||||
|
|
||||||
- uses: actions/cache@v4
|
# -
|
||||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
# name: Set up Docker Buildx
|
||||||
with:
|
# uses: docker/setup-buildx-action@v3
|
||||||
path: |
|
# -
|
||||||
${{ steps.yarn-cache-dir-path.outputs.dir }}
|
# name: Login to Docker Hub
|
||||||
${{ github.workspace }}/.next/cache
|
# uses: docker/login-action@v3
|
||||||
key: ${{ runner.os }}-yarn-${{ steps.get-hash.outputs.hash }}
|
# with:
|
||||||
restore-keys: |
|
# registry: git.jonb.io
|
||||||
${{ runner.os }}-yarn-
|
# username: ${{ gitea.actor }}
|
||||||
- run: yarn
|
# password: ${{ secrets.JONBIO_CI }}
|
||||||
- run: EXPORT=1 UNOPTIMIZED=1 yarn build
|
# -
|
||||||
|
# name: Build and push
|
||||||
-
|
# uses: docker/build-push-action@v6
|
||||||
name: Set up Docker Buildx
|
# with:
|
||||||
uses: docker/setup-buildx-action@v3
|
# context: .
|
||||||
-
|
# push: true
|
||||||
name: Login to Docker Hub
|
# tags: git.jonb.io/jblu/jonbio:latest
|
||||||
uses: docker/login-action@v3
|
# cache-from: type=registry,ref=git.jonb.io/jblu/jonbio:buildcache
|
||||||
with:
|
# cache-to: type=registry,image-manifest=true,oci-mediatypes=true,ref=git.jonb.io/jblu/jonbio:buildcache,mode=max
|
||||||
registry: git.jonb.io
|
# -
|
||||||
username: ${{ gitea.actor }}
|
# name: Deploy App
|
||||||
password: ${{ secrets.JONBIO_CI }}
|
# uses: fjogeleit/http-request-action@v1
|
||||||
-
|
# with:
|
||||||
name: Build and push
|
# url: 'http://192.168.4.11:7777/v1/update'
|
||||||
uses: docker/build-push-action@v6
|
# method: 'GET'
|
||||||
with:
|
# bearerToken: ${{ secrets.DEPLOYTOKEN }}
|
||||||
context: .
|
# timeout: 60000
|
||||||
push: true
|
|
||||||
tags: git.jonb.io/jblu/jonbio:latest
|
|
||||||
cache-from: type=registry,ref=git.jonb.io/jblu/jonbio:buildcache
|
|
||||||
cache-to: type=registry,image-manifest=true,oci-mediatypes=true,ref=git.jonb.io/jblu/jonbio:buildcache,mode=max
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
RUNNER_TOOL_CACHE: /toolcache
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Deploy App
|
|
||||||
uses: fjogeleit/http-request-action@v1
|
|
||||||
with:
|
|
||||||
url: 'http://192.168.4.11:7777/v1/update'
|
|
||||||
method: 'GET'
|
|
||||||
bearerToken: ${{ secrets.DEPLOYTOKEN }}
|
|
||||||
timeout: 60000
|
|
Loading…
x
Reference in New Issue
Block a user