Skip to content

chore: noversion

chore: noversion #6

Workflow file for this run

name: Update config
on:
push:
branches:
- main
permissions:
contents: write
jobs:
setup-build-publish-deploy:
name: Update config ${{ matrix.env }}
environment: ${{ matrix.env }}
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: true
matrix:
include:
- env: dev
- env: stg
- env: prd
steps:
- name: Call update /api/app-config
run: |
mkdir tmp
curl -X GET ${{ vars.BASE_URL }}/api/app-config -H "Content-Type: application/json" -o ./tmp/app-config.json
- name: Checkout source
uses: actions/checkout@v4
with:
repository: ${{ secrets.STATIC_WEB_REPOSITORY }}
token: ${{ secrets.GH_PAT }}
path: source
- name: Move file
run: |
rm -rf ./source/${{ matrix.env }}/conf/app-config.json
mv ./tmp/app-config.json ./source/${{ matrix.env }}/conf/app-config.json
- name: Commit
working-directory: source
run: |
cat ./${{ matrix.env }}/conf/app-config.json
git config user.name "GitHub Actions"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git diff-index --quiet HEAD || git commit -m ':white_check_mark: Update'
git pull origin main && git push origin main