feat: nodejs 20 #1
@ -10,6 +10,10 @@ jobs:
|
|||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
container: fascinated/docker-images:node-latest
|
container: fascinated/docker-images:node-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Get branch name
|
||||||
|
id: branch-name
|
||||||
|
uses: tj-actions/branch-names@v7
|
||||||
|
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
@ -22,9 +26,29 @@ jobs:
|
|||||||
username: ${{ secrets.REPO_USERNAME }}
|
username: ${{ secrets.REPO_USERNAME }}
|
||||||
password: ${{ secrets.REPO_TOKEN }}
|
password: ${{ secrets.REPO_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push
|
- 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
|
uses: docker/build-push-action@v4
|
||||||
|
if: steps.branch-name.outputs.current_branch == 'master'
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
context: .
|
context: .
|
||||||
tags: fascinated/beatsaber-overlay:latest
|
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
|
||||||
|
Reference in New Issue
Block a user