0

Update .gitea/workflows/main.yml
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 6m40s

This commit is contained in:
Nikolai X. Shadeuxs 2024-06-19 04:28:32 -04:00
parent 650fb019c2
commit 39efee7c7b

View File

@ -15,6 +15,14 @@ jobs:
- name: Check out code - name: Check out code
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install pnpm
run: npm install -g pnpm
- name: Set up Docker - name: Set up Docker
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
@ -28,12 +36,12 @@ jobs:
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
id: meta id: meta
with: with:
images: vontainment/v-firecrawl images: vontainment/v-gpt-node-app
flavor: latest=false flavor: latest=false
tags: | tags: |
type=raw,value=main,enable=${{ gitea.ref == 'refs/heads/main' }} type=raw,value=main,enable=${{ github.ref == 'refs/heads/main' }}
type=raw,value=dev,enable=${{ gitea.ref == 'refs/heads/dev' }} type=raw,value=dev,enable=${{ github.ref == 'refs/heads/dev' }}
type=sha,priority=100,enable=${{ gitea.event_name == 'push' }} type=sha,priority=100,enable=${{ github.event_name == 'push' }}
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
@ -43,10 +51,3 @@ jobs:
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/opt/hostedtoolcache/${{ gitea.repository }}-${{ gitea.ref_name }}/build/
cache-to: type=local,dest=/opt/hostedtoolcache/${{ gitea.repository }}-${{ gitea.ref_name }}/build-new/
- name: Rotate build cache
run: |
rm -rf /opt/hostedtoolcache/${{ gitea.repository }}-${{ gitea.ref_name }}/build/
mv /opt/hostedtoolcache/${{ gitea.repository }}-${{ gitea.ref_name }}/build-new/ /opt/hostedtoolcache/${{ gitea.repository }}-${{ gitea.ref_name }}/build/