chore(ci): fix duplicate runs of bundle step
This commit is contained in:
44
.github/workflows/bundle-web.yml
vendored
44
.github/workflows/bundle-web.yml
vendored
@@ -1,44 +0,0 @@
|
|||||||
name: Build and bundle web app into Owncast
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- develop
|
|
||||||
paths:
|
|
||||||
- 'web/**'
|
|
||||||
- '!**.md'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
bundle:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.repository == 'owncast/owncast'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- id: skip_check
|
|
||||||
uses: fkirc/skip-duplicate-actions@v5
|
|
||||||
with:
|
|
||||||
concurrent_skipping: 'same_content_newer'
|
|
||||||
|
|
||||||
- name: Cache node modules
|
|
||||||
uses: actions/cache@v3
|
|
||||||
env:
|
|
||||||
cache-name: cache-node-modules-bundle-web-app
|
|
||||||
with:
|
|
||||||
path: ~/.npm
|
|
||||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('web/package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
|
||||||
${{ runner.os }}-build-
|
|
||||||
${{ runner.os }}-
|
|
||||||
|
|
||||||
- name: Bundle web app (next.js build)
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- run: build/web/bundleWeb.sh
|
|
||||||
|
|
||||||
- name: Commit changes
|
|
||||||
uses: EndBug/add-and-commit@v9
|
|
||||||
with:
|
|
||||||
pull: --rebase --autostash
|
|
||||||
message: 'Bundle embedded web app'
|
|
||||||
add: 'static/web'
|
|
||||||
author_name: Owncast
|
|
||||||
author_email: owncast@owncast.online
|
|
||||||
@@ -5,9 +5,12 @@ on:
|
|||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- web/**
|
- web/**
|
||||||
|
- '!**.md'
|
||||||
|
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- web/**
|
- web/**
|
||||||
|
- '!**.md'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
formatting:
|
formatting:
|
||||||
@@ -22,6 +25,8 @@ jobs:
|
|||||||
uses: fkirc/skip-duplicate-actions@v5
|
uses: fkirc/skip-duplicate-actions@v5
|
||||||
with:
|
with:
|
||||||
concurrent_skipping: 'same_content_newer'
|
concurrent_skipping: 'same_content_newer'
|
||||||
|
cancel_others: 'true'
|
||||||
|
skip_after_successful_duplicate: 'true'
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -77,6 +82,7 @@ jobs:
|
|||||||
author_name: Owncast
|
author_name: Owncast
|
||||||
author_email: owncast@owncast.online
|
author_email: owncast@owncast.online
|
||||||
message: 'Javascript formatting autofixes'
|
message: 'Javascript formatting autofixes'
|
||||||
|
add: ${{ steps.changed-files.outputs.src_all_changed_files }}
|
||||||
pull: '--rebase --autostash'
|
pull: '--rebase --autostash'
|
||||||
|
|
||||||
unused-code:
|
unused-code:
|
||||||
@@ -91,6 +97,8 @@ jobs:
|
|||||||
uses: fkirc/skip-duplicate-actions@v5
|
uses: fkirc/skip-duplicate-actions@v5
|
||||||
with:
|
with:
|
||||||
concurrent_skipping: 'same_content_newer'
|
concurrent_skipping: 'same_content_newer'
|
||||||
|
cancel_others: 'true'
|
||||||
|
skip_after_successful_duplicate: 'true'
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|||||||
Reference in New Issue
Block a user