Bump @babel/traverse from 7.20.1 to 7.23.2 (#153) #1
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: Release workflow | |
on: | |
push: | |
branches: [main, prod-beta, prod-stable] | |
jobs: | |
build-test-release: | |
runs-on: ubuntu-latest | |
env: | |
COMMIT_AUTHOR_USERNAME: GitHub actions | |
COMMIT_AUTHOR_EMAIL: [email protected] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install Dependencies | |
run: npm ci | |
- name: Tests | |
run: npm test | |
- name: Lint | |
run: npm run lint | |
- name: Build | |
run: npm run build --if-present | |
- run: mkdir ${{ github.workspace }}/scripts | |
- name: Pull release file | |
run: curl -sSL https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master/src/release.sh > ${{ github.workspace }}/scripts/release.sh | |
- run: chmod +x "${{ github.workspace }}/scripts/release.sh" | |
- name: Pull nginx conf file | |
run: curl -sSL https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master/src/nginx_conf_gen.sh > ${{ github.workspace }}/scripts/nginx_conf_gen.sh | |
- run: chmod +x "${{ github.workspace }}/scripts/nginx_conf_gen.sh" | |
- name: Pull quay push file | |
run: curl -sSL https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master/src/quay_push.sh > ${{ github.workspace }}/scripts/quay_push.sh | |
- run: chmod +x "${{ github.workspace }}/scripts/quay_push.sh" | |
- run: mkdir ${{ github.workspace }}/.travis | |
- name: Pull the file | |
run: curl -sSL https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master/src/Jenkinsfile > ${{ github.workspace }}/.travis/58231b16fdee45a03a4ee3cf94a9f2c3 | |
- name: Add SSH key | |
run: | | |
mkdir -p /home/runner/.ssh | |
ssh-keyscan github.com >> /home/runner/.ssh/known_hosts | |
echo "${{ secrets.BUILD_PRIVATE_KEY }}" > /home/runner/.ssh/github_actions | |
chmod 600 /home/runner/.ssh/github_actions | |
echo "Host github.com | |
HostName github.com | |
User git | |
AddKeysToAgent yes | |
IdentityFile /home/runner/.ssh/github_actions" >> /home/runner/.ssh/config | |
- name: Set env variables | |
run: | | |
echo "TRAVIS_BRANCH=$GITHUB_REF_NAME" >> $GITHUB_ENV | |
echo "TRAVIS_BUILD_NUMBER=$GITHUB_RUN_ID" >> $GITHUB_ENV | |
echo "${{ github.event.head_commit.message }}" | |
echo "TRAVIS_COMMIT_MESSAGE=`git log -1 --pretty=format:"%s"`" >> $GITHUB_ENV | |
echo "REPO=`node -e 'console.log(require("${{ github.workspace }}/package.json").insights.buildrepo)'`" >> $GITHUB_ENV | |
- run: git config -l | grep 'http\..*\.extraheader' | cut -d= -f1 | xargs -L1 git config --unset-all | |
- name: Check custom_release existence | |
id: check_custom_release | |
uses: andstor/file-existence-action@v1 | |
with: | |
files: "custom_release.sh" | |
- run: ls ${{ github.workspace }} | |
- name: Run default deploy | |
if: steps.check_custom_release.outputs.files_exists != 'true' | |
env: | |
APP_BUILD_DIR: ${{ github.workspace }}/dist | |
run: ${{ github.workspace }}/scripts/release.sh ${{ github.ref_name == 'main' && 'stage-beta' || github.ref_name }} | |
working-directory: ${{ github.workspace }} | |
- name: cleanup previous deploy | |
working-directory: ${{ github.workspace }} | |
run: rm -rf dist/.git | |
- name: Run stage-stable deploy | |
if: steps.check_custom_release.outputs.files_exists != 'true' && github.ref_name == 'main' | |
env: | |
APP_BUILD_DIR: ${{ github.workspace }}/dist | |
run: ${{ github.workspace }}/scripts/release.sh ${{ github.ref_name == 'main' && 'stage-stable' || github.event.workflow_run.head_branch }} | |
working-directory: ${{ github.workspace }} | |
- name: Run the deploy | |
if: steps.check_custom_release.outputs.files_exists == 'true' | |
run: ${{ github.workspace }}/custom_release.sh | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ github.workspace }}/dist/* | |
key: ${{ github.sha }}-released | |