diff --git a/.github/actions/setvars/actions.yml b/.github/actions/setvars/actions.yml new file mode 100644 index 00000000..0f13e862 --- /dev/null +++ b/.github/actions/setvars/actions.yml @@ -0,0 +1,13 @@ +name: 'Set environment variables' +description: 'Configures environment variables for a workflow' +inputs: + varFilePath: + description: 'File path to variable file or directory. Defaults to ./.github/variables/* if none specified and runs against each file in that directory.' + required: false + default: ./.github/variables/* +runs: + using: "composite" + steps: + - run: | + Get-Content ${{ inputs.varFilePath }} >> $Env:GITHUB_ENV + shell: pwsh \ No newline at end of file diff --git a/.github/workflows/e2e_tests.yml b/.github/workflows/e2e_tests.yml index aeeb4f8a..cf4f7a45 100644 --- a/.github/workflows/e2e_tests.yml +++ b/.github/workflows/e2e_tests.yml @@ -82,7 +82,12 @@ jobs: - name: Expose GitHub Runtime uses: crazy-max/ghaction-github-runtime@v2 - + + - name: Set Environment Variables + uses: ./.github/actions/setvars + with: + varFilePath: ./.github/variables/variables.env + - name: Build images run: | env > .env @@ -90,8 +95,8 @@ jobs: export POSTGRES_RECIPE_CONN_STRING="postgresql://${POSTGRES_RECIPE_USER}:${POSTGRES_RECIPE_PASSWORD}@${POSTGRES_RECIPE_HOST}:${POSTGRES_RECIPE_PORT}/${POSTGRES_RECIPE_DB}" docker buildx create --use --driver=docker-container - docker buildx bake -f ./docker-compose-dev.yml --set *.cache-to="type=gha,mode=max" --set *.cache-from="type=gha" --load --platform linux/amd64 - + docker buildx bake -f ./docker-compose-dev.yml --set *.cache-to="type=gha,mode=max" --set *.cache-from="type=gha" --load --set *.platform=linux/amd64 + - name: Spin up services run: | docker-compose -f ./docker-compose-dev.yml up -d datadb