From a90e24f4ec3203830ca2d726ed68fd54fa0b8be5 Mon Sep 17 00:00:00 2001 From: Ludovic Launer Date: Tue, 26 Mar 2024 16:58:39 +0100 Subject: [PATCH] actio update --- .github/workflows/zsm-generate-pr.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/zsm-generate-pr.yml b/.github/workflows/zsm-generate-pr.yml index d738c84..af9b6ad 100644 --- a/.github/workflows/zsm-generate-pr.yml +++ b/.github/workflows/zsm-generate-pr.yml @@ -21,7 +21,7 @@ jobs: - name: Get current date id: date - run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H:%m:%S')" # - name: Create and checkout new branch # run: | @@ -44,6 +44,15 @@ jobs: echo "## Downloading and converting kmlfile ...: ${{ github.event.inputs.ZSM_URL }}" node ./main.js ${{ github.event.inputs.ZSM_URL }} ../airspace/zsm_openair.txt + - name: Insert new ZSM + run: | + cd airspace + echo "## Remove old ZSM entries from france.txt ..." + sed -i '/\* ### ZSM start ###/,/\* ### ZSM stop ###/d' france.txt + + echo "## Insert new ZSM entries ..." + + cd ../airspace git pull @@ -55,3 +64,10 @@ jobs: branch: autogenerated/zsm-${{ steps.date.outputs.date }} create_branch: true file_pattern: 'zsm_openair.txt' + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v3 + with: + title: "Add ZSM file for ${{ steps.date.outputs.date }}" + branch: "autogenerated/zsm-${{ steps.date.outputs.date }}" + body: "This PR adds a new ZSM file for the date ${{ steps.date.outputs.date }}." \ No newline at end of file