Compare commits

..

No commits in common. "8b321221912f507029b385483bc5f66b842e6f80" and "b10348b15afe10c7846bad10fc2dc72cb47d88f0" have entirely different histories.

View File

@ -1,20 +1,16 @@
name: Build and Deploy docker container name: Build and Deploy docker container
'on':
on:
push: push:
branches: main branches: main
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: cstuder/apprise-ga@master # - uses: actions/setup-go@v5
with: # with:
title: 'jonb.io site deployment' # go-version: 'stable'
message: >-
Push received on {{ ref }}
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 - uses: actions/checkout@v4
- name: Install Yarn - name: Install Yarn
run: npm install -g yarn run: npm install -g yarn
@ -22,48 +18,56 @@ jobs:
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 22.x node-version: 22.x
cache: yarn 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
- 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
- uses: actions/cache@v4 - uses: actions/cache@v4
id: yarn-cache id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with: with:
path: | path: |
${{ steps.yarn-cache-dir-path.outputs.dir }} ${{ steps.yarn-cache-dir-path.outputs.dir }}
${{ github.workspace }}/.next/cache ${{ github.workspace }}/.next/cache
key: '${{ runner.os }}-yarn-${{ hashFiles(''**/yarn.lock'') }}' key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-yarn- ${{ runner.os }}-yarn-
- run: yarn - run: yarn
- run: EXPORT=1 UNOPTIMIZED=1 yarn build - run: EXPORT=1 UNOPTIMIZED=1 yarn build
- name: Set up Docker Buildx -
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub -
name: Login to Docker Hub
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.jonb.io registry: git.jonb.io
username: '${{ gitea.actor }}' username: ${{ gitea.actor }}
password: '${{ secrets.JONBIO_CI }}' password: ${{ secrets.JONBIO_CI }}
- name: Build and push -
name: Build and push
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
context: . context: .
push: true push: true
tags: 'git.jonb.io/jblu/jonbio:latest' tags: git.jonb.io/jblu/jonbio:latest
cache-from: 'type=registry,ref=git.jonb.io/jblu/jonbio:buildcache' cache-from: type=registry,ref=git.jonb.io/jblu/jonbio:buildcache
cache-to: >- cache-to: type=registry,image-manifest=true,oci-mediatypes=true,ref=git.jonb.io/jblu/jonbio:buildcache,mode=max
type=registry,image-manifest=true,oci-mediatypes=true,ref=git.jonb.io/jblu/jonbio:buildcache,mode=max -
- name: Deploy App name: Deploy App
uses: fjogeleit/http-request-action@v1 uses: fjogeleit/http-request-action@v1
with: with:
url: 'http://192.168.4.11:7777/v1/update' url: 'http://192.168.4.11:7777/v1/update'
method: GET method: 'GET'
bearerToken: '${{ secrets.DEPLOYTOKEN }}' bearerToken: ${{ secrets.DEPLOYTOKEN }}
timeout: 60000 timeout: 60000
- uses: cstuder/apprise-ga@master
with:
title: 'jonb.io site deployment'
message: Push received on {{ ref }} Commit by {{ head_commit.author.name }}: {{ head_commit.message | truncate(128) }} ({{ head_commit.id[0:7] }}) deployed.
env:
APPRISE_URL: '${{ secrets.APPRISE_URL }}'