ci: tried to fix the deploy workflow
Build and Deploy / build-docker (push) Failing after 27s Details

This commit is contained in:
antifallobst 2023-10-13 00:37:39 +02:00
parent dd912b6f6f
commit cd7a2b2345
Signed by: antifallobst
GPG Key ID: 2B4F402172791BAF
1 changed files with 17 additions and 3 deletions

View File

@ -12,8 +12,10 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Cache Docker layers - name: Cache Docker layers
uses: https://github.com/actions/cache@v3 uses: https://github.com/actions/cache@v3
with: with:
@ -22,18 +24,30 @@ jobs:
key: ${{ runner.os }}-buildx-${{ gitea.sha }} key: ${{ runner.os }}-buildx-${{ gitea.sha }}
restore-keys: | restore-keys: |
${{ runner.os }}-buildx- ${{ runner.os }}-buildx-
- name: Build
- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: git.nerdcult.net/nerdcult
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
env:
ACTIONS_RUNTIME_TOKEN: ''
with: with:
context: . context: .
load: true push: true
tags: nerdcult_frontend:latest tags: git.nerdcult.net/nerdcult/nerdcult_frontend:latest
cache-from: type=local,src=/tmp/.buildx-cache cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new cache-to: type=local,dest=/tmp/.buildx-cache-new
- name: Rotate the cache - name: Rotate the cache
run: | run: |
rm -rf /tmp/.buildx-cache rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Deploy - name: Deploy
env: env:
TOWER_TOKEN: ${{ secrets.WatchtowerToken}} TOWER_TOKEN: ${{ secrets.WatchtowerToken}}