From 418ef17b7387f8053e845e90914ee7901bec4936 Mon Sep 17 00:00:00 2001 From: Lee Date: Wed, 11 Oct 2023 23:02:02 +0000 Subject: [PATCH] update branch name in action --- .gitea/workflows/publish.yaml | 110 +++++++++++++++++----------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml index ab461f4..e36631e 100644 --- a/.gitea/workflows/publish.yaml +++ b/.gitea/workflows/publish.yaml @@ -1,55 +1,55 @@ -name: Publish - -on: - push: - branches: - - "main" - - "development" - -jobs: - docker: - runs-on: ubuntu-22.04 - container: fascinated/docker-images:node-latest - steps: - - name: Get branch name - id: branch-name - uses: tj-actions/branch-names@v7 - - - name: checkout - uses: actions/checkout@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to Repo - uses: docker/login-action@v2 - with: - username: ${{ secrets.REPO_USERNAME }} - password: ${{ secrets.REPO_TOKEN }} - - - name: Restore Docker Build Cache - uses: actions/cache@v3 - id: build-cache - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx - - - name: Build and Push (Latest) - uses: docker/build-push-action@v4 - if: steps.branch-name.outputs.current_branch == 'master' - with: - push: true - context: . - tags: fascinated/beatsaber-overlay:latest - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and Push (Other Branches) - uses: docker/build-push-action@v4 - if: steps.branch-name.outputs.current_branch != 'master' - with: - push: true - context: . - tags: fascinated/beatsaber-overlay:${{ steps.branch-name.outputs.current_branch }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache +name: Publish + +on: + push: + branches: + - "main" + - "development" + +jobs: + docker: + runs-on: ubuntu-22.04 + container: fascinated/docker-images:node-latest + steps: + - name: Get branch name + id: branch-name + uses: tj-actions/branch-names@v7 + + - name: checkout + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to Repo + uses: docker/login-action@v2 + with: + username: ${{ secrets.REPO_USERNAME }} + password: ${{ secrets.REPO_TOKEN }} + + - name: Restore Docker Build Cache + uses: actions/cache@v3 + id: build-cache + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx + + - name: Build and Push (Latest) + uses: docker/build-push-action@v4 + if: steps.branch-name.outputs.current_branch == 'main' + with: + push: true + context: . + tags: fascinated/beatsaber-overlay:latest + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache + + - name: Build and Push (Other Branches) + uses: docker/build-push-action@v4 + if: steps.branch-name.outputs.current_branch != 'main' + with: + push: true + context: . + tags: fascinated/beatsaber-overlay:${{ steps.branch-name.outputs.current_branch }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache