Closed RyanMarten closed 4 years ago
- name: Install Firebase Tools
run: npm install -g firebase-tools
working-directory: app
- name: Get Git Commit Message
run: |
echo ::set-env name=COMMIT_MSG::$(git log --format=%B -n 1 ${{ github.sha }})
- name: Deploy to firebase
working-directory: app
run: firebase deploy --token $FIREBASE_TOKEN -m "${SHA::8} $COMMIT_MSG"
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
SHA: ${{ github.sha }}
Using the github context variable: https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#env-context https://github.community/t5/GitHub-Actions/Accessing-commit-message-in-pull-request-event/td-p/40856
^^ The newest change is at the top of the release history. It now describes the commit with the first 8 characters of the SHA and also the commit message.
This way we can identify which commit it is and can identify which commit broke the website / which one we need to rollback to.