Skip to content

chore: noversion

chore: noversion #7

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 ${{ matrix.env }}
curl -X GET ${{ vars.BASE_URL }}/api/app-config -H "Content-Type: application/json" -o ./${{ matrix.env }}/app-config.json
- name: Upload to artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.env }}-app-config
path: ${{ matrix.env }}/app-config.json
if-no-files-found: warn
# - 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