Skip to content

Automatic AIRAC actions #18

Automatic AIRAC actions

Automatic AIRAC actions #18

Workflow file for this run

name: Automatic AIRAC actions
on:
repository_dispatch:
types: [auto_airac_actions]
workflow_dispatch:
jobs:
airac:
name: Perform AIRAC actions
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Git
run: |
git config --local user.email "[email protected]"
git config --local user.name "VATSIM UK"
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: pip install -r workflows/airac/requirements.txt
- name: Update sector file and GNG data
env:
REMOTE_KEY: ${{ secrets.GITHUB_TOKEN }}
run: |
python workflows/airac/auto_airac_actions.py
echo "airac=$(cat airac.txt)" >> "$GITHUB_ENV"
rm airac.txt
- name: Commit changes
run: |
git add .
git commit -m "Update sector file and GNG data"
- name: Update SMR labels
run: |
bash workflows/airac/update-smr-labels.sh
- name: Commit changes
run: |
git add .
git commit -m "Update SMR labels"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: sf_${{ env.airac }}
title: ${{ env.airac }} Sector File Update
body: This pull request was automatically generated to update the sector file to AIRAC ${{ env.airac }}.
reviewers: luke11brown