Skip to content

Commit

Permalink
[BRE-139] - Revert to Using Push Trigger, Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeebru committed Nov 6, 2024
1 parent a595504 commit 774b863
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 16 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: CD

on:
pull_request:
types:
- closed
push:
branches:
- main
paths:
- "src/**"
workflow_dispatch:


jobs:
version-type:
name: Get version type
if: github.event.pull_request.merged == true
if: github.actor != 'bitwarden-devops-bot'
uses: ./.github/workflows/_version_type.yml

version-bump:
name: Version bump
if: github.event.pull_request.merged == true
if: github.actor != 'bitwarden-devops-bot'
runs-on: ubuntu-22.04
needs: version-type
outputs:
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
release:
name: GitHub release
if: github.event.pull_request.merged == true
if: github.actor != 'bitwarden-devops-bot'
runs-on: ubuntu-22.04
needs: version-bump
steps:
Expand All @@ -99,14 +99,14 @@ jobs:
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 # v1.14.0
with:
commit: ${{ github.sha }}
tag: v${{ steps.get-version.outputs.version }}
name: v${{ steps.get-version.outputs.version }}
tag: v${{ steps.version-bump.outputs.version }}
name: v${{ steps.version-bump.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
draft: false

deploy:
name: Deploy workflow-linter (v2)
if: github.event.pull_request.merged == true
if: github.actor != 'bitwarden-devops-bot'
runs-on: ubuntu-22.04
needs: version-bump
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from ..rule import Rule
from ..utils import LintLevels, Settings


class RuleJobEnvironmentPrefix(Rule):
"""Rule to enforce specific prefixes for environment variables.
Expand Down
1 change: 0 additions & 1 deletion src/bitwarden_workflow_linter/rules/name_capitalized.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from ..rule import Rule
from ..utils import LintLevels, Settings


class RuleNameCapitalized(Rule):
"""Rule to enforce all 'name' values start with a capital letter.
Expand Down
1 change: 0 additions & 1 deletion src/bitwarden_workflow_linter/rules/name_exists.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from ..rule import Rule
from ..utils import LintLevels, Settings


class RuleNameExists(Rule):
"""Rule to enforce a 'name' key exists for every object in GitHub Actions.
Expand Down
1 change: 0 additions & 1 deletion src/bitwarden_workflow_linter/rules/pinned_job_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from ..rule import Rule
from ..utils import LintLevels, Settings


class RuleJobRunnerVersionPinned(Rule):
"""Rule to enforce pinned Runner OS versions.
Expand Down
1 change: 0 additions & 1 deletion src/bitwarden_workflow_linter/rules/step_approved.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from ..rule import Rule
from ..utils import LintLevels, Settings


class RuleStepUsesApproved(Rule):
"""Rule to enforce that all Actions have been pre-approved.
Expand Down
1 change: 0 additions & 1 deletion src/bitwarden_workflow_linter/rules/step_pinned.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from ..rule import Rule
from ..utils import LintLevels, Settings


class RuleStepUsesPinned(Rule):
"""Rule to contain the enforcement logic for pinning Actions versions.
Expand Down
1 change: 0 additions & 1 deletion src/bitwarden_workflow_linter/rules/underscore_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from ..models.step import Step
from ..utils import LintLevels, Settings


class RuleUnderscoreOutputs(Rule):
"""Rule to enforce all GitHub 'outputs' more than one words contain an underscore.
Expand Down

0 comments on commit 774b863

Please sign in to comment.