Skip to content

Commit

Permalink
Update GitHub workflows and ignore .env files
Browse files Browse the repository at this point in the history
  • Loading branch information
warrenchristian1telus committed Feb 29, 2024
1 parent 8b55b24 commit c8f9ef8
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 20 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ on:
paths:
- 'CRON.Dockerfile'
- '**/config/cron/**'
- '**/workflows/build-push-cron-image.yml'
- '**/workflows/**'
- '**/**.env'
pull_request:
branches:
- dev
Expand All @@ -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:
Expand Down
31 changes: 17 additions & 14 deletions .github/workflows/db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,18 @@ on:
#- prod
paths:
- '**/config/mariadb/**'
- '**/workflows/build-push-db-image.yml'
- '**/workflows/**'
- '**/**.env'
pull_request:
branches:
- dev
#- test
#- 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:
Expand All @@ -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
Expand All @@ -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

Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/moodle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ on:
paths:
- 'PHP.Dockerfile'
- '**/config/**'
- '**/workflows/php.yml'
#- '**/workflows/php.yml'
- '**/workflows/**'
- '**/**.env'
pull_request:
branches:
- dev
Expand All @@ -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:
Expand Down

0 comments on commit c8f9ef8

Please sign in to comment.