From ca9e1b8b579079a23dee48318a5b79714e09d753 Mon Sep 17 00:00:00 2001 From: Afro Date: Sat, 31 Aug 2024 13:30:04 -0400 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20DRY=20common=20workflow=20?= =?UTF-8?q?env=20variables=20(#157)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/variables/shared.env | 6 ++++++ .github/workflows/datapack.yml | 10 +++------- .github/workflows/resourcepack.yml | 11 +++-------- .github/workflows/scripts.yml | 14 ++++++-------- 4 files changed, 18 insertions(+), 23 deletions(-) create mode 100644 .github/variables/shared.env diff --git a/.github/variables/shared.env b/.github/variables/shared.env new file mode 100644 index 000000000..6a1cd34eb --- /dev/null +++ b/.github/variables/shared.env @@ -0,0 +1,6 @@ +ASSETS_DIR=null +BLOCKBENCH_PATH=null +DATAPACK=null +MINECRAFT_PATH=null +RESOURCEPACK=null +WORLD_NAME=omega-flowey-remastered diff --git a/.github/workflows/datapack.yml b/.github/workflows/datapack.yml index 76e82f0cc..da50ab146 100644 --- a/.github/workflows/datapack.yml +++ b/.github/workflows/datapack.yml @@ -7,18 +7,14 @@ env: FABRIC_SERVER: https://meta.fabricmc.net/v2/versions/loader/1.21/0.15.11/1.0.1/server/jar PACKTEST: https://cdn.modrinth.com/data/XsKUhp45/versions/sQSunYHv/packtest-1.8-beta3-mc1.21.jar - ASSETS_DIR: null - BLOCKBENCH_PATH: null - DATAPACK: null - MINECRAFT_PATH: null - RESOURCEPACK: null - WORLD_NAME: omega-flowey-remastered - jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: tw3lveparsecs/github-actions-set-variables@v0.2 + with: + envFilePath: ./.github/variables/shared.env - name: Install Yarn 3.6.3 run: corepack enable - name: Setup cache diff --git a/.github/workflows/resourcepack.yml b/.github/workflows/resourcepack.yml index ebf5cd07a..3c408cd7d 100644 --- a/.github/workflows/resourcepack.yml +++ b/.github/workflows/resourcepack.yml @@ -2,19 +2,14 @@ name: resourcepack on: [push] -env: - ASSETS_DIR: null - BLOCKBENCH_PATH: null - DATAPACK: null - MINECRAFT_PATH: null - RESOURCEPACK: null - WORLD_NAME: omega-flowey-remastered - jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: tw3lveparsecs/github-actions-set-variables@v0.2 + with: + envFilePath: ./.github/variables/shared.env - name: Install Yarn 3.6.3 run: corepack enable - name: Setup cache diff --git a/.github/workflows/scripts.yml b/.github/workflows/scripts.yml index c8b276299..930bdb119 100644 --- a/.github/workflows/scripts.yml +++ b/.github/workflows/scripts.yml @@ -2,19 +2,14 @@ name: scripts on: [push] -env: - ASSETS_DIR: null - BLOCKBENCH_PATH: null - DATAPACK: null - MINECRAFT_PATH: null - RESOURCEPACK: null - WORLD_NAME: omega-flowey-remastered - jobs: format: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: tw3lveparsecs/github-actions-set-variables@v0.2 + with: + envFilePath: ./.github/variables/shared.env - name: Install Yarn 3.6.3 run: corepack enable - name: Setup cache @@ -32,6 +27,9 @@ jobs: needs: format steps: - uses: actions/checkout@v4 + - uses: tw3lveparsecs/github-actions-set-variables@v0.2 + with: + envFilePath: ./.github/variables/shared.env - name: Install Yarn 3.6.3 run: corepack enable - name: Setup cache