Create Custom Map #803
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
name: Create Custom Map | |
on: | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: Tag used to fetch spots | |
required: true | |
type: string | |
categories: | |
description: Map categories | |
type: choice | |
required: true | |
default: 'maps' | |
options: | |
- maps | |
- magazine | |
- filmer | |
- skater | |
- photographer | |
- video | |
- skatepark | |
- years | |
- shop | |
- greatest | |
- members | |
name: | |
type: string | |
required: true | |
subtitle: | |
type: string | |
required: false | |
edito: | |
type: string | |
required: false | |
about: | |
type: string | |
required: false | |
videos: | |
description: "URLs of videos (if multiple, separate them by commas: ',')" | |
type: string | |
required: false | |
env: | |
NEXT_PUBLIC_BUGSNAG_KEY: ${{ secrets.NEXT_PUBLIC_BUGSNAG_KEY }} | |
jobs: | |
create_map: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.REPO_PAT }} | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: 1.1.6 | |
- name: Write map data | |
run: | | |
bun ./scripts/create_map.js \ | |
--tag ${{ inputs.tag }} \ | |
--name "${{ inputs.name }}" \ | |
--category "${{ inputs.categories }}" \ | |
--subtitle "${{ inputs.subtitle }}" \ | |
--edito "${{ inputs.edito }}" \ | |
--about "${{ inputs.about }}" \ | |
--videos "${{ inputs.videos }}" | |
- name: Write commit | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: "['./apps/api/src/data/customMaps/_spots.json']" | |
default_author: user_info | |
message: 'feat: Add new ${{ inputs.tag }} map' | |
- run: bun install --frozen-lockfile | |
- run: bun lint |