forked from tv2/sisyfos-audio-controller
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update to node 18 and update all dependencies
- Loading branch information
Showing
8 changed files
with
3,702 additions
and
4,143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,125 +1,125 @@ | ||
name: Dev Node CI | ||
|
||
env: | ||
node-version: 16 | ||
node-package-manager: yarn | ||
|
||
on: | ||
push: | ||
branches: | ||
- "develop" | ||
|
||
jobs: | ||
cache-dependencies: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Access repository | ||
uses: actions/checkout@v2 | ||
- uses: ./.github/actions/cache | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
needs: cache-dependencies | ||
steps: | ||
- name: Access repository | ||
uses: actions/checkout@v2 | ||
- uses: ./.github/actions/test | ||
|
||
validate-dependencies: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Access repository | ||
uses: actions/checkout@v2 | ||
- uses: ./.github/actions/validate-dependencies | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- test | ||
- validate-dependencies | ||
steps: | ||
- name: Access repository | ||
uses: actions/checkout@v2 | ||
- uses: ./.github/actions/cache | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Upload client build artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ github.event.repository.name }}-client-develop | ||
path: client/dist | ||
|
||
- name: Upload server build artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ github.event.repository.name }}-server-develop | ||
path: server/dist | ||
|
||
check-docker-credentials: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
outputs: | ||
defined: ${{ steps.username.outputs.defined == 'true' && steps.password.outputs.defined == 'true' }} | ||
steps: | ||
- name: Access repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check if has username | ||
id: username | ||
uses: ./.github/actions/check-secret | ||
with: | ||
secret: ${{ secrets.DOCKER_USERNAME }} | ||
|
||
- name: Check if has password | ||
id: password | ||
uses: ./.github/actions/check-secret | ||
with: | ||
secret: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
publish-docker-image: | ||
runs-on: ubuntu-latest | ||
if: needs.check-docker-credentials.outputs.defined == 'true' | ||
needs: | ||
- check-docker-credentials | ||
steps: | ||
- name: Access repository | ||
uses: actions/checkout@v2 | ||
|
||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ github.event.repository.name }}-client-develop | ||
path: client/dist | ||
|
||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ github.event.repository.name }}-server-develop | ||
path: server/dist | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: "tv2media/${{ github.event.repository.name }}" | ||
tags: | | ||
type=ref,event=branch | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
name: Dev Node CI | ||
|
||
env: | ||
node-version: 18 | ||
node-package-manager: yarn | ||
|
||
on: | ||
push: | ||
branches: | ||
- "develop" | ||
|
||
jobs: | ||
cache-dependencies: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Access repository | ||
uses: actions/checkout@v2 | ||
- uses: ./.github/actions/cache | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
needs: cache-dependencies | ||
steps: | ||
- name: Access repository | ||
uses: actions/checkout@v2 | ||
- uses: ./.github/actions/test | ||
|
||
validate-dependencies: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Access repository | ||
uses: actions/checkout@v2 | ||
- uses: ./.github/actions/validate-dependencies | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- test | ||
- validate-dependencies | ||
steps: | ||
- name: Access repository | ||
uses: actions/checkout@v2 | ||
- uses: ./.github/actions/cache | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Upload client build artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ github.event.repository.name }}-client-develop | ||
path: client/dist | ||
|
||
- name: Upload server build artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ github.event.repository.name }}-server-develop | ||
path: server/dist | ||
|
||
check-docker-credentials: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
outputs: | ||
defined: ${{ steps.username.outputs.defined == 'true' && steps.password.outputs.defined == 'true' }} | ||
steps: | ||
- name: Access repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check if has username | ||
id: username | ||
uses: ./.github/actions/check-secret | ||
with: | ||
secret: ${{ secrets.DOCKER_USERNAME }} | ||
|
||
- name: Check if has password | ||
id: password | ||
uses: ./.github/actions/check-secret | ||
with: | ||
secret: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
publish-docker-image: | ||
runs-on: ubuntu-latest | ||
if: needs.check-docker-credentials.outputs.defined == 'true' | ||
needs: | ||
- check-docker-credentials | ||
steps: | ||
- name: Access repository | ||
uses: actions/checkout@v2 | ||
|
||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ github.event.repository.name }}-client-develop | ||
path: client/dist | ||
|
||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: ${{ github.event.repository.name }}-server-develop | ||
path: server/dist | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v3 | ||
with: | ||
images: "tv2media/${{ github.event.repository.name }}" | ||
tags: | | ||
type=ref,event=branch | ||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
Oops, something went wrong.