From f341e246ff315d28843fa33a39c14522694fbe9d Mon Sep 17 00:00:00 2001 From: Jonathan Branan Date: Mon, 4 Nov 2024 23:18:28 -0600 Subject: [PATCH] updated notifications --- .gitea/workflows/build.yml | 69 ++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 36 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 683615b..6026ef5 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -1,16 +1,19 @@ name: Build and Deploy docker container - -on: +'on': push: branches: main - jobs: build: runs-on: ubuntu-latest steps: - # - uses: actions/setup-go@v5 - # with: - # go-version: 'stable' + - uses: cstuder/apprise-ga@master + with: + title: 'Push received on {{ ref }}' + message: >- + Commit by {{ head_commit.author.name }}: {{ head_commit.message | + truncate(128) }} ({{ head_commit.id[0:7] }}) + env: + APPRISE_URL: '${{ secrets.APPRISE_URL }}' - uses: actions/checkout@v4 - name: Install Yarn run: npm install -g yarn @@ -18,56 +21,50 @@ jobs: uses: actions/setup-node@v4 with: node-version: 22.x - cache: 'yarn' - # - name: Hash files for cache - # uses: https://gitea.com/actions/go-hashfiles@v0.0.1 - # id: get-hash - # with: - # patterns: |- - # **/yarn.lock - # **/*.js - # **/*.jsx - # **/*.ts - # **/*.tsx + cache: yarn - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - uses: actions/cache@v4 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + id: yarn-cache with: path: | ${{ steps.yarn-cache-dir-path.outputs.dir }} ${{ github.workspace }}/.next/cache - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + key: '${{ runner.os }}-yarn-${{ hashFiles(''**/yarn.lock'') }}' restore-keys: | ${{ runner.os }}-yarn- - run: yarn - run: EXPORT=1 UNOPTIMIZED=1 yarn build - - - name: Set up Docker Buildx + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub + - 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 + 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 + 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 + method: GET + bearerToken: '${{ secrets.DEPLOYTOKEN }}' + timeout: 60000 + - uses: cstuder/apprise-ga@master + with: + title: 'Push received on {{ ref }}' + message: >- + Commit by {{ head_commit.author.name }}: {{ head_commit.message | + truncate(128) }} ({{ head_commit.id[0:7] }}) + env: + APPRISE_URL: '${{ secrets.APPRISE_URL }}' \ No newline at end of file