Skip to content

Commit

Permalink
combine converting to one github action
Browse files Browse the repository at this point in the history
  • Loading branch information
WatheqAlshowaiter committed Feb 23, 2024
1 parent 5f75e2f commit bdc1e35
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/changed-yemen-info-csv-excel.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: Generate CSV and Excel formats from JSON
on:
push:
paths:
- 'yemen-info.json'
workflow_dispatch:
jobs:
build:
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/changed-yemen-info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
strategy:
fail-fast: true

steps:
- uses: actions/checkout@v3
Expand All @@ -24,6 +27,26 @@ jobs:
- name: run the automated tasks
run: python3 -B utilities/automated-tasks.py

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo

- name: Install dependencies
working-directory: "./utilities/json2csv"
run: composer install --no-interaction

- name: List Installed Dependencies
working-directory: "./utilities/json2csv"
run: composer show -D

- name: Execute command
run: cd utilities/json2csv && php json2csv convert

- name: Set file permissions
run: chmod 777 automated/yemen-info.csv automated/yemen-info.xlsx

- name: add and commit generated file
run: |
git pull origin main
Expand Down

0 comments on commit bdc1e35

Please sign in to comment.