From c8f9ef8802fea94c5a4a27ecbc6994ab8a429620 Mon Sep 17 00:00:00 2001 From: Warren Christian <70002196+warrenchristian1telus@users.noreply.github.com> Date: Wed, 28 Feb 2024 16:35:32 -0800 Subject: [PATCH] Update GitHub workflows and ignore .env files --- .github/workflows/cron.yml | 7 +++++-- .github/workflows/db.yml | 31 +++++++++++++++++-------------- .github/workflows/moodle.yml | 8 ++++++-- .github/workflows/php.yml | 8 ++++++-- 4 files changed, 34 insertions(+), 20 deletions(-) diff --git a/.github/workflows/cron.yml b/.github/workflows/cron.yml index 5a6bcf2..4287016 100644 --- a/.github/workflows/cron.yml +++ b/.github/workflows/cron.yml @@ -18,7 +18,8 @@ on: paths: - 'CRON.Dockerfile' - '**/config/cron/**' - - '**/workflows/build-push-cron-image.yml' + - '**/workflows/**' + - '**/**.env' pull_request: branches: - dev @@ -27,7 +28,9 @@ on: paths: - 'CRON.Dockerfile' - '**/config/cron/**' - - '**/workflows/build-push-cron-image.yml' + #- '**/workflows/build-push-cron-image.yml' + - '**/workflows/**' + - '**/**.env' jobs: #Print variables for logging and debugging purposes checkEnv: diff --git a/.github/workflows/db.yml b/.github/workflows/db.yml index bbf26e8..c2784ba 100644 --- a/.github/workflows/db.yml +++ b/.github/workflows/db.yml @@ -12,7 +12,8 @@ on: #- prod paths: - '**/config/mariadb/**' - - '**/workflows/build-push-db-image.yml' + - '**/workflows/**' + - '**/**.env' pull_request: branches: - dev @@ -20,7 +21,9 @@ on: #- prod paths: - '**/config/mariadb/**' - - '**/workflows/build-push-db-image.yml' + #- '**/workflows/build-push-db-image.yml' + - '**/workflows/**' + - '**/**.env' jobs: #Print variables for logging and debugging purposes checkEnv: @@ -35,13 +38,13 @@ jobs: example.env example.versions.env - - name: Setup Env Vars - id: dotenv - uses: falti/dotenv-action@v1 - with: - path: example.env - export-variables: true - keys-case: upper + # - name: Setup Env Vars + # id: dotenv + # uses: falti/dotenv-action@v1 + # with: + # path: example.env + # export-variables: true + # keys-case: upper # - name: Setup Env Version Vars # id: dotenv_versions @@ -50,11 +53,11 @@ jobs: # path: example.versions.env # export-variables: true - # - name: Setup All Env Vars - # run: | - # echo "Import .env to $GITHUB_ENV (ignoring any commented [#] or empty lines)" - # grep -v '^#' ./example.env | grep -v '^$' >> $GITHUB_ENV - # grep -v '^#' ./example.versions.env | grep -v '^$' >> $GITHUB_ENV + - name: Setup All Env Vars + run: | + echo "Import .env to $GITHUB_ENV (ignoring any commented [#] or empty lines)" + grep -v '^#' ./example.env | grep -v '^$' >> $GITHUB_ENV + grep -v '^#' ./example.versions.env | grep -v '^$' >> $GITHUB_ENV # Build DB Image diff --git a/.github/workflows/moodle.yml b/.github/workflows/moodle.yml index d9c7177..3ad52df 100644 --- a/.github/workflows/moodle.yml +++ b/.github/workflows/moodle.yml @@ -18,7 +18,9 @@ on: paths: - 'Moodle.Dockerfile' - '**/config/moodle/**' - - '**/workflows/build-push-moodle-image.yml' + #- '**/workflows/build-push-moodle-image.yml' + - '**/workflows/**' + - '**/**.env' pull_request: branches: - dev @@ -27,7 +29,9 @@ on: paths: - 'Moodle.Dockerfile' - '**/config/moodle/**' - - '**/workflows/build-push-moodle-image.yml' + #- '**/workflows/build-push-moodle-image.yml' + - '**/workflows/**' + - '**/**.env' jobs: #Print variables for logging and debugging purposes checkEnv: diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 216f1a9..2ba21c5 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -18,7 +18,9 @@ on: paths: - 'PHP.Dockerfile' - '**/config/**' - - '**/workflows/php.yml' + #- '**/workflows/php.yml' + - '**/workflows/**' + - '**/**.env' pull_request: branches: - dev @@ -27,7 +29,9 @@ on: paths: - '**.Dockerfile' - '**/config/**' - - '**/workflows/build-moodle-jfrog.yml' + #- '**/workflows/build-moodle-jfrog.yml' + - '**/workflows/**' + - '**/**.env' jobs: #Print variables for logging and debugging purposes checkEnv: