From 9ca0f162ebd6738cca82c842344622b0651de9f1 Mon Sep 17 00:00:00 2001 From: Friedrich von Never Date: Sat, 20 Jan 2024 23:32:37 +0100 Subject: [PATCH 1/2] CI: update the action versions, add periodic trigger --- .github/workflows/periodic.yml | 17 +++++++++++++++++ .github/workflows/test.yml | 17 ++++++++++------- .idea/dictionaries/fried.xml | 7 +++++++ 3 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/periodic.yml create mode 100644 .idea/dictionaries/fried.xml diff --git a/.github/workflows/periodic.yml b/.github/workflows/periodic.yml new file mode 100644 index 0000000..7b82cc5 --- /dev/null +++ b/.github/workflows/periodic.yml @@ -0,0 +1,17 @@ +name: Periodic Trigger +on: + schedule: + - cron: '0 0 * * 0' # Every Sunday + +jobs: + main: + runs-on: ubuntu-latest + steps: + - name: Trigger the main workflow + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + EVENT: periodic + ORG: ForNeVeR + REPO: msdn-delocalizer + run: | + curl -d "{\"event_type\": \"${EVENT}\"}" -H "Content-Type: application/json" -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.everest-preview+json" "https://api.github.com/repos/${ORG}/${REPO}/dispatches" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ecbe1d3..9ad5abe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,25 +2,28 @@ name: Build and Test on: push: branches: - - master + - main pull_request: branches: - - master + - main + repository_dispatch: + types: [ periodic ] jobs: build: strategy: matrix: - image: [macos-12, ubuntu-22.04, windows-2022] + image: [ macos-12, ubuntu-22.04, windows-2022 ] + fail-fast: false runs-on: ${{ matrix.image }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - id: yarn-cache name: Determine Yarn cache directory run: | echo "::set-output name=path::$(yarn cache dir)" - name: Yarn cache - uses: actions/cache@v1.1.0 + uses: actions/cache@v4 with: path: ${{ steps.yarn-cache.outputs.path }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} @@ -34,8 +37,8 @@ jobs: run: | yarn test - name: Upload the distribution - if: matrix.image == 'ubuntu-18.04' - uses: actions/upload-artifact@v1.0.0 + if: matrix.image == 'ubuntu-22.04' + uses: actions/upload-artifact@v4 with: name: msdn-delocalizer path: build/dest diff --git a/.idea/dictionaries/fried.xml b/.idea/dictionaries/fried.xml new file mode 100644 index 0000000..2ae48ac --- /dev/null +++ b/.idea/dictionaries/fried.xml @@ -0,0 +1,7 @@ + + + + delocalizer + + + \ No newline at end of file From 352fb58d93e1bdc24e28d100846b44b3b0021557 Mon Sep 17 00:00:00 2001 From: Friedrich von Never Date: Sat, 20 Jan 2024 23:37:36 +0100 Subject: [PATCH 2/2] CI: migrate from the obsolete GitHub output handling --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ad5abe..76343aa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,8 +20,9 @@ jobs: - uses: actions/checkout@v4 - id: yarn-cache name: Determine Yarn cache directory + shell: bash run: | - echo "::set-output name=path::$(yarn cache dir)" + echo "path=$(yarn cache dir)" >> $GITHUB_OUTPUT - name: Yarn cache uses: actions/cache@v4 with: