fix(deps): update github vulnerability alerts [security] #237
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Environment - Deploy | |
on: | |
pull_request: | |
types: [ opened, synchronize, reopened ] | |
branches: | |
- master | |
jobs: | |
deploy-test-env: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [12.x] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
ref: ${{ github.head_ref }} | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install | |
run: npm ci | |
- name: Build client | |
run: npm run build | |
- name: Install SSH key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
name: id_rsa # optional | |
known_hosts: ${{ secrets.KNOWN_HOSTS }} | |
- id: git_push | |
name: Push to Server | |
run: | | |
git remote add server [email protected]:repos/qa.git | |
git config --global user.email "[email protected]" | |
git config --global user.name "Github Actions" | |
git add build -f | |
git commit -m "Build files" | |
exec 5>&1 | |
OUTPUT=$(git push --force --set-upstream server HEAD:${GITHUB_REPOSITORY}--${GITHUB_HEAD_REF} 2>&1 | tee /dev/fd/5) | |
echo "GIT_OUTPUT<<EOF" >> $GITHUB_ENV | |
echo "$OUTPUT" | grep "^remote: github:" | sed s/^remote:\ github:\ /""/g >> $GITHUB_ENV | |
echo "EOF" >> $GITHUB_ENV | |
- uses: marocchino/sticky-pull-request-comment@v2 | |
if: ${{ env.GIT_OUTPUT }} | |
with: | |
header: test-env | |
append: true | |
message: | | |
${{ env.GIT_OUTPUT }} |