Update workflows with linter suggestions (#1174)

This commit is contained in:
Vince Grassia 2021-09-02 16:05:17 -04:00 committed by GitHub
parent ca00fda023
commit 9832deb20c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 22 deletions

View File

@ -1,3 +1,4 @@
---
name: Build
on:
@ -43,7 +44,7 @@ jobs:
- name: Cache npm
id: npm-cache
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
path: '~/.npm'
key: ${{ runner.os }}-${{ github.run_id }}-npm-${{ hashFiles('**/package-lock.json') }}
@ -70,7 +71,7 @@ jobs:
uses: Azure/get-keyvault-secrets@80ccd3fafe5662407cc2e55f202ee34bfff8c403
with:
keyvault: "bitwarden-prod-kv"
secrets: "docker-password,
secrets: "docker-password,
docker-username,
dct-delegate-2-repo-passphrase,
dct-delegate-2-key"
@ -127,14 +128,14 @@ jobs:
- name: Push rc images
if: github.ref == 'refs/heads/rc'
run: docker push bitwarden/web:rc
env:
env:
DOCKER_CONTENT_TRUST: 1
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ steps.retrieve-secrets.outputs.dct-delegate-2-repo-passphrase }}
- name: Push dev images
if: github.ref == 'refs/heads/master'
run: docker push bitwarden/web:dev
env:
env:
DOCKER_CONTENT_TRUST: 1
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ steps.retrieve-secrets.outputs.dct-delegate-2-repo-passphrase }}
@ -158,7 +159,7 @@ jobs:
- name: Cache npm
id: npm-cache
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
path: '~/.npm'
key: ${{ runner.os }}-${{ github.run_id }}-npm-${{ hashFiles('**/package-lock.json') }}
@ -209,7 +210,7 @@ jobs:
if [[ $TAG_EXTENSION ]]; then
IMAGE_TAG=$IMAGE_TAG-$TAG_EXTENSION
fi
fi
echo "::set-output name=value::$IMAGE_TAG"
- name: Tag image
@ -274,9 +275,8 @@ jobs:
- name: Checkout repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: npm install
- name: NPM install
run: npm install
- name: npm build
- name: NPM build
run: npm run build:cloud

View File

@ -1,10 +1,11 @@
---
name: Crowdin Sync
on:
workflow_dispatch:
inputs: {}
#schedule:
# - cron: '0 0 * * *'
# schedule:
# - cron: '0 0 * * *'
jobs:
crowdin-sync:

View File

@ -1,6 +1,7 @@
---
name: Deploy
on:
on:
workflow_dispatch:
inputs:
release_version:
@ -40,7 +41,7 @@ jobs:
with:
ref: rc
- name: setup git config
- name: Setup git config
run: |
git config user.name = "GitHub Action Bot"
git config user.email = "<>"
@ -70,4 +71,3 @@ jobs:
VERSION: ${{ steps.release-version.outputs.version }}
PR_BRANCH: deploy-${{ steps.release-version.outputs.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,6 +1,7 @@
---
name: QA Deploy
on:
on:
workflow_dispatch:
inputs:
image_extension:
@ -19,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
- name: Setup
run:
@ -59,7 +60,7 @@ jobs:
if [[ $TAG_EXTENSION ]]; then
IMAGE_TAG=$IMAGE_TAG-$TAG_EXTENSION
fi
fi
echo "::set-output name=value::$IMAGE_TAG"
- name: Deploy Web image

View File

@ -1,3 +1,4 @@
---
name: Release
on:
@ -9,6 +10,7 @@ on:
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
release_upload_url: ${{ steps.create_release.outputs.upload_url }}
@ -62,10 +64,11 @@ jobs:
prerelease: false
ubuntu:
name: Ubuntu
runs-on: ubuntu-latest
needs: setup
env:
RELEASE_VERSION: ${{ needs.setup.outputs.release_version }}
_RELEASE_VERSION: ${{ needs.setup.outputs.release_version }}
steps:
- name: Set up Node
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea
@ -96,7 +99,7 @@ jobs:
uses: Azure/get-keyvault-secrets@80ccd3fafe5662407cc2e55f202ee34bfff8c403
with:
keyvault: "bitwarden-prod-kv"
secrets: "docker-password,
secrets: "docker-password,
docker-username,
dct-delegate-2-repo-passphrase,
dct-delegate-2-key"
@ -136,19 +139,19 @@ jobs:
docker build -t bitwarden/web .
- name: Tag version
run: docker tag bitwarden/web bitwarden/web:$RELEASE_VERSION
run: docker tag bitwarden/web bitwarden/web:$_RELEASE_VERSION
- name: List Docker images
run: docker images
- name: Push latest images
run: docker push bitwarden/web:latest
env:
env:
DOCKER_CONTENT_TRUST: 1
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ steps.retrieve-secrets.outputs.dct-delegate-2-repo-passphrase }}
- name: Push version images
run: docker push bitwarden/web:$RELEASE_VERSION
run: docker push bitwarden/web:$_RELEASE_VERSION
env:
DOCKER_CONTENT_TRUST: 1
DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE: ${{ steps.retrieve-secrets.outputs.dct-delegate-2-repo-passphrase }}