-
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Migrate CF Pages to CF Wrangler action (based on jellyfin/jellyfin-web#5894) * Create event-based workflows, all the specific actions are now reusable workflows. * Fix labeler definition file Signed-off-by: Fernando Fernández <ferferga@hotmail.com>
- Loading branch information
Showing
13 changed files
with
299 additions
and
255 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,25 +1,36 @@ | ||
tests: | ||
- '**/*.spec.js' | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- '**/*.spec.*' | ||
|
||
github_actions: | ||
- '.github/workflows/*' | ||
ci: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- '.github/workflows/**/**' | ||
|
||
pinia: | ||
- 'frontend/store/**/*.ts' | ||
'frontend:store': | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'frontend/store/**/*.ts' | ||
|
||
plugins: | ||
- 'frontend/plugins/**/*.ts' | ||
'frontend:plugins': | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'frontend/plugins/**/*.ts' | ||
|
||
vue: | ||
- '**/*.vue' | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- '**/*.vue' | ||
|
||
docker: | ||
- 'Dockerfile*' | ||
packaging: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'packaging/**/**' | ||
|
||
ui: | ||
- any: | ||
[ | ||
'frontend/components/**/*.vue', | ||
'frontend/layouts/**/*.vue', | ||
'frontend/pages/**/*.vue' | ||
] | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- 'frontend/components/**/*.vue' | ||
- 'frontend/layouts/**/*.vue' | ||
- 'frontend/pages/**/*.vue' |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
* Reusable workflows should be under a `reusable` folder. Track https://github.com/orgs/community/discussions/10773 |
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
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Deploy 🏗️ | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
branch: | ||
required: true | ||
type: string | ||
commit: | ||
required: false | ||
type: string | ||
comment: | ||
required: false | ||
type: boolean | ||
artifact_name: | ||
required: false | ||
type: string | ||
default: frontend | ||
|
||
jobs: | ||
cf-pages: | ||
name: CloudFlare Pages 📃 | ||
runs-on: ubuntu-latest | ||
environment: ${{ inputs.branch == 'master' && 'production' || 'preview' }} | ||
outputs: | ||
url: ${{ steps.cf.outputs.deployment-url }} | ||
|
||
steps: | ||
- name: Download workflow artifact ⬇️ | ||
uses: actions/download-artifact@v4.1.8 | ||
with: | ||
name: ${{ inputs.artifact_name }} | ||
path: dist | ||
|
||
- name: Publish to Cloudflare Pages 📃 | ||
uses: cloudflare/wrangler-action@v3.7.0 | ||
id: cf | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
command: pages deploy dist --project-name=jf-vue --branch=${{ inputs.branch }} | ||
|
||
compose-comment: | ||
name: Compose and push comment 📝 | ||
# Always run so the comment is composed for the workflow summary | ||
if: ${{ always() }} | ||
uses: ./.github/workflows/__job_messages.yml | ||
secrets: inherit | ||
needs: | ||
- cf-pages | ||
|
||
with: | ||
branch: ${{ inputs.branch }} | ||
commit: ${{ inputs.commit }} | ||
preview_url: ${{ needs.cf-pages.outputs.url }} | ||
in_progress: false | ||
comment: ${{ inputs.comment }} |
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
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
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
Oops, something went wrong.