Skip to content

Commit

Permalink
Fix workflow linter detected issues on the workflows (#1210)
Browse files Browse the repository at this point in the history
## 🎟️ Tracking

<!-- Paste the link to the Jira or GitHub issue or otherwise describe /
point to where this change is coming from. -->

## 📔 Objective

Fix workflow linter detected issues in the workflows.

<!-- Describe what the purpose of this PR is, for example what bug
you're fixing or new feature you're adding. -->

## ⏰ Reminders before review

- Contributor guidelines followed
- All formatters and local linters executed and passed
- Written new unit and / or integration tests where applicable
- Protected functional changes with optionality (feature flags)
- Used internationalization (i18n) for all UI strings
- CI builds passed
- Communicated to DevOps any deployment requirements
- Updated any necessary documentation (Confluence, contributing docs) or
informed the documentation
  team

## 🦮 Reviewer guidelines

<!-- Suggested interactions but feel free to use (or not) as you desire!
-->

- 👍 (`:+1:`) or similar for great changes
- 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info
- ❓ (`:question:`) for questions
- 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry
that's not quite a confirmed
  issue and could potentially benefit from discussion
- 🎨 (`:art:`) for suggestions / improvements
- ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or
concerns needing attention
- 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or
indications of technical debt
- ⛏ (`:pick:`) for minor or nitpick changes
  • Loading branch information
michalchecinski authored Jan 24, 2025
1 parent 225e6cf commit 656f753
Show file tree
Hide file tree
Showing 25 changed files with 72 additions and 62 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
build-windows:
name: Building CLI for - ${{ matrix.settings.os }} - ${{ matrix.settings.target }}
runs-on: ${{ matrix.settings.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.settings.os || 'ubuntu-24.04' }}
needs: setup
env:
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:

build-macos:
name: Building CLI for - ${{ matrix.settings.os }} - ${{ matrix.settings.target }}
runs-on: ${{ matrix.settings.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.settings.os || 'ubuntu-24.04' }}
needs: setup
env:
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:

build-linux:
name: Building CLI for - ${{ matrix.settings.os }} - ${{ matrix.settings.target }}
runs-on: ${{ matrix.settings.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.settings.os || 'ubuntu-24.04' }}
needs: setup
env:
_PACKAGE_VERSION: ${{ needs.setup.outputs.package_version }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/build-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ on:

jobs:
generate-schemas:
name: Generate schemas
uses: ./.github/workflows/generate_schemas.yml

build_rust:
name: Build Rust
uses: ./.github/workflows/build-rust-cross-platform.yml

build:
Expand Down Expand Up @@ -43,13 +45,13 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: install dependencies linux
- name: Install dependencies linux
if: runner.os == 'Linux'
run: |
sudo apt-get install -y nlohmann-json3-dev
sudo apt-get install -y libboost-all-dev
- name: install dependencies macos
- name: Install dependencies macos
if: runner.os == 'macOS'
run: |
brew install nlohmann-json
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ on:

jobs:
generate_schemas:
name: Generate schemas
uses: ./.github/workflows/generate_schemas.yml

build_rust:
name: Build Rust
uses: ./.github/workflows/build-rust-cross-platform.yml

version:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
restore-keys: |
${{ runner.os }}-go-
- name: npm ci
- name: Run npm ci
run: npm ci

- name: Generate schemas
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ on:

jobs:
generate_schemas:
name: Generate schemas
uses: ./.github/workflows/generate_schemas.yml

build_rust:
name: Build Rust
uses: ./.github/workflows/build-rust-cross-platform.yml

build_java:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-napi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ defaults:

jobs:
generate_schemas:
name: Generate schemas
uses: ./.github/workflows/generate_schemas.yml

build:
name: Building @bitwarden/sdk-napi for - ${{ matrix.settings.os }}
runs-on: ${{ matrix.settings.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.settings.os || 'ubuntu-24.04' }}
needs: generate_schemas
strategy:
fail-fast: false
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-python-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ defaults:

jobs:
generate_schemas:
name: Generate schemas
uses: ./.github/workflows/generate_schemas.yml

setup:
Expand All @@ -35,7 +36,7 @@ jobs:
build:
name: Building Python wheel for - ${{ matrix.settings.os }} - ${{ matrix.settings.target }}
runs-on: ${{ matrix.settings.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.settings.os || 'ubuntu-24.04' }}
needs:
- generate_schemas
- setup
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
cp "temp/${platforms[$i]}/${files[$i]}" "languages/ruby/bitwarden_sdk_secrets/lib/${platforms[$i]}/${files[$i]}"
done
- name: bundle install
- name: Run bundle install
run: bundle install
working-directory: languages/ruby/bitwarden_sdk_secrets

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-rust-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ jobs:
build:
name: Building ${{matrix.package}} for - ${{ matrix.os }}

runs-on: ${{ matrix.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.os || 'ubuntu-24.04' }}

strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
- macos-13
- ubuntu-24.04
- windows-2022

package:
- bitwarden
Expand All @@ -46,7 +46,7 @@ jobs:

release-dry-run:
name: Release dry-run
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
if: ${{ github.ref == 'refs/head/main' }}
needs: build
steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-rust-cross-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ jobs:
- name: Cache cargo registry
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5

- uses: goto-bus-stop/setup-zig@abea47f85e598557f500fa1fd2ab7464fcb39406 # v2.2.1
- name: Install Zig
if: ${{ contains(matrix.settings.target, 'musl') }}
uses: goto-bus-stop/setup-zig@abea47f85e598557f500fa1fd2ab7464fcb39406 # v2.2.1
with:
version: 0.12.0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/direct-minimal-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ defaults:
jobs:
direct-minimal-versions:
name: Check dependencies minimal versions for - ${{ matrix.settings.os }} - ${{ matrix.settings.target }}
runs-on: ${{ matrix.settings.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.settings.os || 'ubuntu-24.04' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -48,5 +48,5 @@ jobs:
with:
key: dmv-${{ matrix.settings.target }}-cargo-${{ matrix.settings.os }}

- name: cargo check direct-minimal-versions
- name: Run cargo check direct-minimal-versions
run: cargo check -Z direct-minimal-versions --all-features
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
style:
name: Check Style

runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/minimum-rust-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ defaults:
jobs:
msrv:
name: Check MSRV for - ${{ matrix.settings.os }} - ${{ matrix.settings.target }}
runs-on: ${{ matrix.settings.os || 'ubuntu-latest' }}
runs-on: ${{ matrix.settings.os || 'ubuntu-24.04' }}
strategy:
fail-fast: false
matrix:
Expand All @@ -41,5 +41,5 @@ jobs:
with:
key: msrv-${{ matrix.settings.target }}-cargo-${{ matrix.settings.os }}

- name: cargo check MSRV
- name: Run cargo check MSRV
run: cargo check -p bitwarden --all-features
18 changes: 9 additions & 9 deletions .github/workflows/publish-bws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
name: Setup
runs-on: ubuntu-22.04
outputs:
release-version: ${{ steps.version-output.outputs.version }}
release-tag: ${{ steps.version-output.outputs.tag_name }}
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
release_version: ${{ steps.version-output.outputs.version }}
release_tag: ${{ steps.version-output.outputs.tag_name }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -75,8 +75,8 @@ jobs:
runs-on: ubuntu-22.04
needs: setup
env:
_VERSION: ${{ needs.setup.outputs.release-version }}
_TAG_NAME: ${{ needs.setup.outputs.release-tag }}
_VERSION: ${{ needs.setup.outputs.release_version }}
_TAG_NAME: ${{ needs.setup.outputs.release_tag }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
- name: Generate tag list
id: tag-list
env:
VERSION: ${{ needs.setup.outputs.release-version }}
VERSION: ${{ needs.setup.outputs.release_version }}
DRY_RUN: ${{ inputs.release_type == 'Dry Run' }}
run: |
if [[ "${DRY_RUN}" == "true" ]]; then
Expand Down Expand Up @@ -228,20 +228,20 @@ jobs:
needs: setup
if: ${{ inputs.release_type != 'Dry Run' }}
env:
_DEPLOYMENT_ID: ${{ needs.setup.outputs.deployment-id }}
_DEPLOYMENT_ID: ${{ needs.setup.outputs.deployment_id }}
steps:
- name: Update deployment status to Success
if: ${{ inputs.release_type != 'Dry Run' && success() }}
uses: chrnorm/deployment-status@9a72af4586197112e0491ea843682b5dc280d806 # v2.0.3
with:
token: "${{ secrets.GITHUB_TOKEN }}"
state: "success"
deployment-id: ${{ env._DEPLOYMENT_ID }}
deployment_id: ${{ env._DEPLOYMENT_ID }}

- name: Update deployment status to Failure
if: ${{ inputs.release_type != 'Dry Run' && failure() }}
uses: chrnorm/deployment-status@9a72af4586197112e0491ea843682b5dc280d806 # v2.0.3
with:
token: "${{ secrets.GITHUB_TOKEN }}"
state: "failure"
deployment-id: ${{ env._DEPLOYMENT_ID }}
deployment_id: ${{ env._DEPLOYMENT_ID }}
4 changes: 2 additions & 2 deletions .github/workflows/publish-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ jobs:
with:
token: "${{ secrets.GITHUB_TOKEN }}"
state: "success"
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}

- name: Update deployment status to Failure
if: ${{ inputs.release_type != 'Dry Run' && failure() }}
uses: chrnorm/deployment-status@9a72af4586197112e0491ea843682b5dc280d806 # v2.0.3
with:
token: "${{ secrets.GITHUB_TOKEN }}"
state: "failure"
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
12 changes: 6 additions & 6 deletions .github/workflows/publish-napi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
name: Setup
runs-on: ubuntu-22.04
outputs:
release-version: ${{ steps.version-output.outputs.version }}
tag-name: ${{ steps.version-output.outputs.tag_name }}
release_version: ${{ steps.version-output.outputs.version }}
tag_name: ${{ steps.version-output.outputs.tag_name }}
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -63,8 +63,8 @@ jobs:
runs-on: ubuntu-22.04
needs: setup
env:
_PKG_VERSION: ${{ needs.setup.outputs.release-version }}
_TAG_NAME: ${{ needs.setup.outputs.tag-name }}
_PKG_VERSION: ${{ needs.setup.outputs.release_version }}
_TAG_NAME: ${{ needs.setup.outputs.tag_name }}
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -143,12 +143,12 @@ jobs:
with:
token: "${{ secrets.GITHUB_TOKEN }}"
state: "success"
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}

- name: Update deployment status to Failure
if: ${{ inputs.release_type != 'Dry Run' && failure() }}
uses: chrnorm/deployment-status@9a72af4586197112e0491ea843682b5dc280d806 # v2.0.3
with:
token: "${{ secrets.GITHUB_TOKEN }}"
state: "failure"
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
12 changes: 6 additions & 6 deletions .github/workflows/publish-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
name: Setup
runs-on: ubuntu-22.04
outputs:
release-version: ${{ steps.version-output.outputs.version }}
tag-name: ${{ steps.version-output.outputs.tag_name }}
release_version: ${{ steps.version-output.outputs.version }}
tag_name: ${{ steps.version-output.outputs.tag_name }}
steps:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -63,8 +63,8 @@ jobs:
runs-on: ubuntu-22.04
needs: setup
env:
_VERSION: ${{ needs.setup.outputs.release-version }}
_TAG_NAME: ${{ needs.setup.outputs.tag-name }}
_VERSION: ${{ needs.setup.outputs.release_version }}
_TAG_NAME: ${{ needs.setup.outputs.tag_name }}
steps:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -115,12 +115,12 @@ jobs:
with:
token: "${{ secrets.GITHUB_TOKEN }}"
state: "success"
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}

- name: Update deployment status to Failure
if: ${{ inputs.release_type != 'Dry Run' && failure() }}
uses: chrnorm/deployment-status@9a72af4586197112e0491ea843682b5dc280d806 # v2.0.3
with:
token: "${{ secrets.GITHUB_TOKEN }}"
state: "failure"
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
12 changes: 6 additions & 6 deletions .github/workflows/publish-rust-crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ on:

jobs:
setup:
name: setup
name: Setup
runs-on: ubuntu-22.04
outputs:
release-version: ${{ steps.version-output.outputs.version }}
release-tag: ${{ steps.version-output.outputs.tag_name }}
release_version: ${{ steps.version-output.outputs.version }}
release_tag: ${{ steps.version-output.outputs.tag_name }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ needs.setup.outputs.release-tag }}
ref: ${{ needs.setup.outputs.release_tag }}

- name: Login to Azure
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
Expand Down Expand Up @@ -113,12 +113,12 @@ jobs:
with:
token: "${{ secrets.GITHUB_TOKEN }}"
state: "success"
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}

- name: Update deployment status to Failure
if: ${{ inputs.release_type != 'Dry Run' && failure() }}
uses: chrnorm/deployment-status@9a72af4586197112e0491ea843682b5dc280d806 # v2.0.3
with:
token: "${{ secrets.GITHUB_TOKEN }}"
state: "failure"
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
Loading

0 comments on commit 656f753

Please sign in to comment.