Skip to content

Update count_themes.yml #3

Update count_themes.yml

Update count_themes.yml #3

Workflow file for this run

name: Create envfile
on: [ push ]
jobs:
count:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Count themes
run: |
THEMES_NUMBER=$(ls ./themes/ | wc -l)
echo "Themes counted: $THEMES_NUMBER"
echo "THEMES_NUMBER=$THEMES_NUMBER" >> $GITHUB_ENV
- name: Export one variable
uses: UnlyEd/[email protected]
with:
variables: THEMES_NUMBER="$THEMES_NUMBER"
create-envfile:
needs: count
runs-on: ubuntu-latest
steps:
- name: Make envfile
uses: SpicyPizza/[email protected]
with:
envkey_THEMES_NUMBER: ${{ vars.THEMES_NUMBER }}
file_name: .env
fail_on_empty: true
sort_keys: false