1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-05 21:18:13 -05:00

Update workflows with linter suggestions (#1562)

* Update workflows with linter suggestions

* Update workflows with linter suggestions
This commit is contained in:
Vince Grassia 2021-09-02 16:03:28 -04:00 committed by GitHub
parent 97307c0852
commit 1d3c7cc936
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 61 additions and 50 deletions

View File

@ -1,3 +1,4 @@
---
name: Build name: Build
on: on:

View File

@ -1,13 +1,14 @@
---
name: Workflow Linter name: Workflow Linter
on: on:
push: push:
branches: add-workflow-linter branches: add-workflow-linter
# branches-ignore: # branches-ignore:
# - 'l10n_master' # - 'l10n_master'
# - 'gh-pages' # - 'gh-pages'
# workflow_dispatch: # workflow_dispatch:
# inputs: {} # inputs: {}
jobs: jobs:
cloc: cloc:
@ -15,7 +16,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
- name: Install cloc - name: Install cloc
run: | run: |

View File

@ -1,3 +1,4 @@
---
name: Prod Deploy name: Prod Deploy
on: on:
@ -12,6 +13,7 @@ on:
jobs: jobs:
setup: setup:
name: Setup
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
package_version: ${{ steps.create_tags.outputs.package_version }} package_version: ${{ steps.create_tags.outputs.package_version }}
@ -53,7 +55,7 @@ jobs:
env: env:
RELEASE_TAG_NAME_INPUT: ${{ github.event.inputs.release_tag_name_input }} RELEASE_TAG_NAME_INPUT: ${{ github.event.inputs.release_tag_name_input }}
- name: test outputs - name: Test outputs
run: | run: |
echo "Package Version: ${{ steps.create_tags.outputs.package_version }}" echo "Package Version: ${{ steps.create_tags.outputs.package_version }}"
echo "Tag Version: ${{ steps.create_tags.outputs.tag_version }}" echo "Tag Version: ${{ steps.create_tags.outputs.tag_version }}"
@ -82,8 +84,7 @@ jobs:
- setup - setup
- sso - sso
env: env:
PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }} _PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
steps: steps:
- name: Print environment - name: Print environment
run: | run: |
@ -134,7 +135,7 @@ jobs:
- name: Re-tag Docker images - name: Re-tag Docker images
run: | run: |
docker tag bitwarden/${{ matrix.service_name }}:rc bitwarden/${{ matrix.service_name }}:latest docker tag bitwarden/${{ matrix.service_name }}:rc bitwarden/${{ matrix.service_name }}:latest
docker tag bitwarden/${{ matrix.service_name }}:rc bitwarden/${{ matrix.service_name }}:$PACKAGE_VERSION docker tag bitwarden/${{ matrix.service_name }}:rc bitwarden/${{ matrix.service_name }}:$_PACKAGE_VERSION
- name: List Docker images - name: List Docker images
run: docker images run: docker images
@ -142,7 +143,7 @@ jobs:
- name: Push Docker images - name: Push Docker images
run: | run: |
docker push bitwarden/${{ matrix.service_name }}:latest docker push bitwarden/${{ matrix.service_name }}:latest
docker push bitwarden/${{ matrix.service_name }}:$PACKAGE_VERSION docker push bitwarden/${{ matrix.service_name }}:$_PACKAGE_VERSION
env: env:
DOCKER_CONTENT_TRUST: 1 DOCKER_CONTENT_TRUST: 1
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ steps.retrieve-secrets.outputs.dct-delegate-2-repo-passphrase }} DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ steps.retrieve-secrets.outputs.dct-delegate-2-repo-passphrase }}
@ -152,6 +153,7 @@ jobs:
build: build:
name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: setup needs: setup
strategy: strategy:
@ -178,13 +180,12 @@ jobs:
- name: Identity - name: Identity
base_path: . base_path: .
env: env:
PKG_VERSION: ${{ needs.setup.outputs.package_version }} _TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
with: with:
ref: ${{ env.TAG_VERSION }} ref: ${{ env._TAG_VERSION }}
- name: Set up Node - name: Set up Node
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea
@ -202,7 +203,7 @@ jobs:
npm --version npm --version
gulp --version gulp --version
- name: load env vars - name: Load env vars
run: | run: |
echo "Base Path: ${BASE_PATH}" echo "Base Path: ${BASE_PATH}"
echo "Name: ${NAME}" echo "Name: ${NAME}"
@ -255,6 +256,7 @@ jobs:
deploy-identity: deploy-identity:
name: Deploy Identity
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
steps: steps:
@ -286,6 +288,7 @@ jobs:
deploy-api: deploy-api:
name: Deploy API
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
steps: steps:
@ -317,6 +320,7 @@ jobs:
deploy-billing: deploy-billing:
name: Deploy Billing
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
steps: steps:
@ -348,6 +352,7 @@ jobs:
deploy-events: deploy-events:
name: Deploy Events
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
steps: steps:
@ -379,6 +384,7 @@ jobs:
deploy-sso: deploy-sso:
name: Deploy SSO
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
steps: steps:
@ -410,6 +416,7 @@ jobs:
deploy-portal: deploy-portal:
name: Deploy Portal
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
steps: steps:
@ -441,6 +448,7 @@ jobs:
deploy-admin: deploy-admin:
name: Deploy Admin
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
steps: steps:
@ -469,4 +477,3 @@ jobs:
slot-name: "staging" slot-name: "staging"
publish-profile: ${{ steps.retrieve-secrets.outputs.appservices-admin-webapp-publish-profile }} publish-profile: ${{ steps.retrieve-secrets.outputs.appservices-admin-webapp-publish-profile }}
package: ./Admin.zip package: ./Admin.zip

View File

@ -1,3 +1,4 @@
---
name: QA Deploy name: QA Deploy
on: on:
@ -12,6 +13,7 @@ on:
jobs: jobs:
build: build:
name: Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
@ -158,6 +160,7 @@ jobs:
deploy: deploy:
name: Deploy
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: always() if: always()
needs: needs:
@ -196,7 +199,7 @@ jobs:
- name: Retrieve secrets - name: Retrieve secrets
id: retrieve-secrets id: retrieve-secrets
env: env:
VAULT_NAME: "bitwarden-qa-kv" VAULT_NAME: "bitwarden-qa-kv"
run: | run: |
webapp_name=$(az keyvault secret show --vault-name $VAULT_NAME --name appservices-${{ steps.setup.outputs.name_lower }}-webapp-name --query value --output tsv) webapp_name=$(az keyvault secret show --vault-name $VAULT_NAME --name appservices-${{ steps.setup.outputs.name_lower }}-webapp-name --query value --output tsv)
echo "::add-mask::$webapp_name" echo "::add-mask::$webapp_name"

View File

@ -1,3 +1,4 @@
---
name: Release name: Release
on: on:
@ -13,7 +14,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
release_upload_url: ${{ steps.create_release.outputs.upload_url }} release_upload_url: ${{ steps.create_release.outputs.upload_url }}
release_version: ${{ steps.create_tags.outputs.package_version }}
tag_version: ${{ steps.create_tags.outputs.tag_version }} tag_version: ${{ steps.create_tags.outputs.tag_version }}
steps: steps:
- name: Branch check - name: Branch check
@ -69,8 +69,7 @@ jobs:
needs: needs:
- setup - setup
env: env:
RELEASE_VERSION: ${{ needs.setup.outputs.release_version }} _TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
TAG_VERSION: ${{ needs.setup.outputs.tag_version }}
steps: steps:
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
@ -124,6 +123,6 @@ jobs:
-a ./swagger.json \ -a ./swagger.json \
-a ./docker-stub.zip \ -a ./docker-stub.zip \
-m "" \ -m "" \
$TAG_VERSION $_TAG_VERSION
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}