Skip to content

Feature/2631 SCC Report Summary page #207

Feature/2631 SCC Report Summary page

Feature/2631 SCC Report Summary page #207

Workflow file for this run

name: Firestore rules
on:
pull_request:
branches:
- develop
paths:
- 'database/firestore.rules'
push:
branches:
- develop
paths:
- 'database/firestore.rules'
concurrency: one_at_a_time
jobs:
test_and_deploy:
runs-on: ubuntu-latest
steps:
## Install and test
- uses: actions/checkout@v4
with:
token: ${{ secrets.DEPLOY_TOKEN }}
- uses: actions/setup-node@master
with:
node-version: '18.20.3'
- run: npm ci
- name: Test
run: npm run ci:test:rules
## Update release notes and bump version (for pushes)
- name: Update release notes (for pushes)
if: github.event_name == 'push' && success()
id: release_drafter
uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter.yml
disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
- name: Get package version (for pushes)
if: github.event_name == 'push' && success()
id: package_version
run: echo "current_version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Bump package version (for pushes)
if: github.event_name == 'push' && success() &&
steps.package_version.outputs.current_version != steps.release_drafter.outputs.tag_name
run: |
echo "Bump package version from ${{ steps.package_version.outputs.current_version }} to ${{ steps.release_drafter.outputs.tag_name }}"
git config --local user.email "$(git log --format='%ae' HEAD^!)"
git config --local user.name "$(git log --format='%an' HEAD^!)"
npm version ${{ steps.release_drafter.outputs.tag_name }} -m "Bump version number to %s"
git push
## Deploy to develop and staging (for pushes)
- name: Deploy to develop (for pushes)
if: ${{ github.event_name == 'push' && success() }}
run: npm run deploy:rules
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}
- name: Deploy to staging (for pushes)
if: ${{ github.event_name == 'push' && success() }}
run: npm run staging:deploy:rules
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}