Skip to content

Commit

Permalink
Create count_themes.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
zen0bit committed Oct 8, 2024
1 parent f1ea0ca commit fa97e2a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 14 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/count_themes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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
14 changes: 0 additions & 14 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,6 @@ concurrency:
cancel-in-progress: false

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"
# Build job
build:
runs-on: ubuntu-latest
Expand Down

0 comments on commit fa97e2a

Please sign in to comment.