From cc9b9c91d74da472a4d540b8f1b762e131a78ceb Mon Sep 17 00:00:00 2001 From: Micaiah Martin <77340197+mimartin12@users.noreply.github.com> Date: Mon, 20 Dec 2021 10:15:43 -0700 Subject: [PATCH] Patch CI to allow for redeployments. Add Github actions to prettier .ignore as well. (#1352) * Added inputs for reruns * Added github workflows to .prettierignore * Moved the Redeploy logic into the setup job --- .github/workflows/release.yml | 21 +++++++++++++++------ .prettierignore | 3 +++ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4e4426f6c..544d6b4afe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,15 @@ name: Release on: workflow_dispatch: - inputs: {} + inputs: + release_type: + description: 'Release Options' + required: true + default: 'Initial Release' + type: choice + options: + - Initial Release + - Redeploy jobs: setup: @@ -24,7 +32,7 @@ jobs: fi - name: Checkout repo - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # 2.3.4 + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # 2.3.4 - name: Check Release Version id: version @@ -34,7 +42,8 @@ jobs: curl -sL https://api.github.com/repos/$GITHUB_REPOSITORY/releases/latest | jq -r ".tag_name" ) - if [ "v$version" == "$previous_release_tag_version" ]; then + if [ "v$version" == "$previous_release_tag_version" ] && \ + [ "${{ github.event.inputs.release_type }}" == "Initial Release" ]; then echo "[!] Already released v$version. Please bump version to continue" exit 1 fi @@ -106,7 +115,7 @@ jobs: _TAG_VERSION: ${{ needs.setup.outputs.tag_version }} steps: - name: Checkout Repo - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 with: ref: gh-pages @@ -116,7 +125,7 @@ jobs: git push -u origin deploy-$_TAG_VERSION - name: Checkout Repo - uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 + uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 - name: Setup git config run: | @@ -138,7 +147,7 @@ jobs: run: unzip web-*-cloud-COMMERCIAL.zip - name: Deploy GitHub Pages - uses: crazy-max/ghaction-github-pages@db4476a01402e1a7ce05f41832040eef16d14925 # v2.5.0 + uses: crazy-max/ghaction-github-pages@db4476a01402e1a7ce05f41832040eef16d14925 # v2.5.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/.prettierignore b/.prettierignore index 2a26e8cfd3..3e3263bc00 100644 --- a/.prettierignore +++ b/.prettierignore @@ -8,3 +8,6 @@ jslib src/locales src/404/*.min.css src/scripts/u2f.js + +# Github Workflows +.github/workflows \ No newline at end of file