Update map_list.yaml with new map data #1019
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main | |
- "sync-map-*" | |
paths-ignore: | |
- "tools/**" | |
- "cloud/**" | |
pull_request: | |
paths-ignore: | |
- "tools/**" | |
- "cloud/**" | |
workflow_dispatch: | |
inputs: | |
deploy: | |
description: "Deploy?" | |
required: true | |
type: boolean | |
default: false | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/scripts-setup | |
with: | |
cache-name: build | |
download-artifacts: 'false' | |
- name: Build | |
run: source .envrc && make -j $(nproc) | |
- name: Test | |
run: source .envrc && make -j $(nproc) test | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: gen-artifacts | |
path: gen | |
deploy-cdn: | |
runs-on: ubuntu-latest | |
needs: build-and-test | |
if: vars.MAPS_METADATA_BUCKET_NAME && (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: gen-artifacts | |
path: gen | |
- name: Install Rclone | |
run: | | |
curl -L https://rclone.org/install.sh | sudo bash | |
- name: Deploy | |
run: ./scripts/deploy.sh ${{ github.sha }} ${{ !env.ACT && (github.ref == 'refs/heads/main' || github.event.inputs.deploy == true) }} | |
env: | |
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }} | |
CLOUDFLARE_ACCESS_KEY_ID: ${{ vars.CLOUDFLARE_R2_ACCESS_KEY_ID }} | |
CLOUDFLARE_SECRET_ACCESS_KEY: ${{ secrets.CLOUDFLARE_R2_SECRET_ACCESS_KEY }} | |
R2_BUCKET_NAME: ${{ vars.MAPS_METADATA_BUCKET_NAME }} | |
- name: Publish update on MQTT | |
uses: juhrlass/[email protected] | |
with: | |
protocol: mqtts | |
host: broker.hivemq.com | |
port: 8883 | |
topic: dev.beyondallreason.maps-metadata/live_maps/updated:v1 | |
message: ${{ github.sha }} | |
deploy-chobby: | |
runs-on: ubuntu-latest | |
needs: build-and-test | |
if: vars.ENABLE_BYAR_CHOBBY_PUSH && ((github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch') | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/scripts-setup | |
with: | |
cache-name: chobby | |
- name: Checkout BYAR-Chobby | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.repository_owner }}/BYAR-Chobby | |
path: BYAR-Chobby | |
ssh-key: ${{ secrets.SSH_BYAR_CHOBBY_DEPLOY_KEY }} | |
- name: Patch Chobby | |
run: | | |
source .envrc | |
tsx scripts/js/src/update_byar_chobby_images.ts BYAR-Chobby | |
cp gen/mapDetails.lua BYAR-Chobby/LuaMenu/configs/gameConfig/byar/mapDetails.lua | |
cp gen/mapBoxes.conf BYAR-Chobby/LuaMenu/configs/gameConfig/byar/savedBoxes.dat | |
- name: Commit and push | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
repository: BYAR-Chobby | |
commit_message: | | |
Automatic update of maps from maps-metadata | |
From commit ${{ github.repository }}@${{ github.sha }} | |
deploy-spads-config: | |
runs-on: ubuntu-latest | |
needs: build-and-test | |
if: vars.ENABLE_SPADS_CONFIG_PUSH && ((github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch') | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: gen-artifacts | |
path: gen | |
- name: Checkout SPADS Config | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.repository_owner }}/spads_config_bar | |
path: spads_config_bar | |
ssh-key: ${{ secrets.SSH_SPADS_CONFIG_DEPLOY_KEY }} | |
- name: Patch SPADS Config | |
run: | | |
cp gen/mapBoxes.conf spads_config_bar/etc/mapBoxes.conf | |
cp gen/mapLists.conf spads_config_bar/etc/mapLists.conf | |
cp gen/mapPresets.conf spads_config_bar/etc/mapPresets.conf | |
cp gen/mapBattlePresets.conf spads_config_bar/etc/mapBattlePresets.conf | |
python3 scripts/py/update_spads_conf.py spads_config_bar/etc/spads_cluster.conf | |
- name: Commit and push | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
repository: spads_config_bar | |
commit_message: | | |
Automatic update of maps from maps-metadata | |
From commit ${{ github.repository }}@${{ github.sha }} | |
deploy-website: | |
runs-on: ubuntu-latest | |
needs: build-and-test | |
if: vars.WEBFLOW_COLLECTION_ID && ((github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch') | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/scripts-setup | |
with: | |
cache-name: website | |
- name: Push to website | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
retry_wait_seconds: 10 | |
command: | | |
source .envrc | |
tsx scripts/js/src/sync_to_webflow.ts sync | |
env: | |
WEBFLOW_API_TOKEN: ${{ secrets.WEBFLOW_API_TOKEN }} | |
WEBFLOW_COLLECTION_ID: ${{ vars.WEBFLOW_COLLECTION_ID }} | |
deploy-gdrive: | |
runs-on: ubuntu-latest | |
needs: build-and-test | |
if: vars.ENABLE_GDRIVE_PUSH && ((github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch') | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/scripts-setup | |
with: | |
cache-name: gdrive | |
- name: Authenticate to Google Cloud | |
id: auth | |
uses: google-github-actions/auth@v2 | |
with: | |
workload_identity_provider: projects/187238959541/locations/global/workloadIdentityPools/github-actions/providers/github | |
service_account: [email protected] | |
- name: Push to GDrive | |
run: | | |
source .envrc | |
tsx scripts/js/src/sync_to_gdrive.ts sync | |
deploy-teiserver: | |
runs-on: ubuntu-latest | |
needs: build-and-test | |
if: vars.TEISERVER_URL && ((github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch') | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/scripts-setup | |
with: | |
cache-name: website | |
- name: Push to teiserver | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
retry_wait_seconds: 30 | |
command: | | |
source .envrc | |
tsx scripts/js/src/sync_to_teiserver.ts | |
env: | |
TEISERVER_URL: ${{ vars.TEISERVER_URL }} | |
TEISERVER_CLIENT_ID: ${{ vars.TEISERVER_CLIENT_ID }} | |
TEISERVER_CLIENT_SECRET: ${{ secrets.TEISERVER_CLIENT_SECRET }} |