Skip to content

Create count_themes.yml #1

Create count_themes.yml

Create count_themes.yml #1

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:
runs-on: ubuntu-latest
steps:
- name: Make envfile
uses: SpicyPizza/[email protected]
with:
envkey_DEBUG: false
envkey_VARIABLE: ${{ vars.THEMES_NUMBER }}
file_name: .env
fail_on_empty: true
sort_keys: false