From 1ad980266b2dec41e1f6ea000874f7917a70e901 Mon Sep 17 00:00:00 2001 From: Jonathan Branan Date: Sat, 2 Nov 2024 23:35:34 -0500 Subject: [PATCH] a --- .gitea/workflows/build.yml | 87 ++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 46 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 984bb88..f854ab0 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -19,7 +19,8 @@ jobs: with: node-version: 22.x 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 with: patterns: |- @@ -31,49 +32,43 @@ jobs: - name: Get yarn cache directory path id: yarn-cache-dir-path 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'`) - 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 - - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - registry: git.jonb.io - username: ${{ gitea.actor }} - password: ${{ secrets.JONBIO_CI }} - - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: . - 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 \ No newline at end of file + # - + # name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + # - + # name: Login to Docker Hub + # uses: docker/login-action@v3 + # with: + # registry: git.jonb.io + # username: ${{ gitea.actor }} + # password: ${{ secrets.JONBIO_CI }} + # - + # name: Build and push + # uses: docker/build-push-action@v6 + # with: + # context: . + # 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 + # - + # 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 \ No newline at end of file