Skip to content

Commit

Permalink
UPDATE: change the actions data type to map
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeebru committed Dec 18, 2023
1 parent d2192ca commit cc0b05f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
9 changes: 1 addition & 8 deletions lint-workflow/lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,14 +299,7 @@ def lint(filename):
if "bitwarden/gh-actions" not in path:
try:
# Check if actions are in supported actions list.
actions_count = 0
for action in supported_actions['supported_actions']:
if action in path:
break
else:
actions_count += 1

if actions_count > 0:
if path != supported_actions[path]:
findings.append(
LintFinding(
f"Step {str(i)} of job key '{job_key}' uses an unsupported action: {path}.",
Expand Down
3 changes: 2 additions & 1 deletion lint-workflow/supported-actions.json
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
{ "supported_actions": ["act10ns/slack", "actions/cache", "actions/checkout", "actions/delete-package-versions", "actions/download-artifact", "actions/github-script", "actions/labeler", "actions/setup-dotnet", "actions/setup-java", "actions/setup-node", "actions/setup-python", "actions/stale", "actions/upload-artifact", "android-actions/setup-android", "Asana/create-app-attachment-github-action", "Azure/functions-action", "Azure/get-keyvault-secrets", "Azure/login", "azure/webapps-deploy", "bitwarden/sm-action", "checkmarx/ast-github-action", "chrnorm/deployment-action", "chrnorm/deployment-status", "chromaui/action", "cloudflare/pages-action", "convictional/trigger-workflow-and-wait", "crazy-max/ghaction-import-gpg", "crowdin/github-action", "dawidd6/action-download-artifact", "dawidd6/action-homebrew-bump-formula", "digitalocean/action-doctl", "docker/build-push-action", "docker/setup-buildx-action", "docker/setup-qemu-action", "dorny/test-reporter", "dtolnay/rust-toolchain", "futureware-tech/simulator-action", "hashicorp/setup-packer", "macauley/action-homebrew-bump-cask", "microsoft/setup-msbuild", "ncipollo/release-action", "nuget/setup-nuget", "peter-evans/close-issue", "ruby/setup-ruby", "samuelmeuli/action-snapcraft", "snapcore/action-build", "sonarsource/sonarcloud-github-action", "stackrox/kube-linter-action", "Swatinem/rust-cache", "SwiftDocOrg/github-wiki-publish-action", "SwiftDocOrg/swift-doc", "tj-actions/changed-files", "yogevbd/enforce-label-action"]}
{ "act10ns/slack": "act10ns/slack", "actions/cache": "actions/cache", "actions/checkout": "actions/checkout", "actions/delete-package-versions": "actions/delete-package-versions", "actions/download-artifact": "actions/download-artifact", "actions/github-script": "actions/github-script", "actions/labeler": "actions/labeler", "actions/setup-dotnet": "actions/setup-dotnet", "actions/setup-java": "actions/setup-java", "actions/setup-node": "actions/setup-node", "actions/setup-python": "actions/setup-python", "actions/stale": "actions/stale", "actions/upload-artifact": "actions/upload-artifact", "android-actions/setup-android": "android-actions/setup-android", "Asana/create-app-attachment-github-action": "Asana/create-app-attachment-github-action", "Azure/functions-action": "Azure/functions-action", "Azure/get-keyvault-secrets": "Azure/get-keyvault-secrets", "Azure/login": "Azure/login", "azure/webapps-deploy": "azure/webapps-deploy", "bitwarden/sm-action": "bitwarden/sm-action", "checkmarx/ast-github-action": "checkmarx/ast-github-action", "chrnorm/deployment-action": "chrnorm/deployment-action", "chrnorm/deployment-status": "chrnorm/deployment-status", "chromaui/action": "chromaui/action", "cloudflare/pages-action": "cloudflare/pages-action", "convictional/trigger-workflow-and-wait": "convictional/trigger-workflow-and-wait", "crazy-max/ghaction-import-gpg": "crazy-max/ghaction-import-gpg", "crowdin/github-action": "crowdin/github-action", "dawidd6/action-download-artifact": "dawidd6/action-download-artifact", "dawidd6/action-homebrew-bump-formula": "dawidd6/action-homebrew-bump-formula", "digitalocean/action-doctl": "digitalocean/action-doctl", "docker/build-push-action": "docker/build-push-action", "docker/setup-buildx-action": "docker/setup-buildx-action", "docker/setup-qemu-action": "docker/setup-qemu-action", "dorny/test-reporter": "dorny/test-reporter", "dtolnay/rust-toolchain": "dtolnay/rust-toolchain", "futureware-tech/simulator-action": "futureware-tech/simulator-action", "hashicorp/setup-packer": "hashicorp/setup-packer", "macauley/action-homebrew-bump-cask": "macauley/action-homebrew-bump-cask", "microsoft/setup-msbuild": "microsoft/setup-msbuild", "ncipollo/release-action": "ncipollo/release-action", "peter-evans/close-issue": "peter-evans/close-issue", "ruby/setup-ruby": "ruby/setup-ruby", "samuelmeuli/action-snapcraft": "samuelmeuli/action-snapcraft", "snapcore/action-build": "snapcore/action-build", "sonarsource/sonarcloud-github-action": "sonarsource/sonarcloud-github-action", "stackrox/kube-linter-action": "stackrox/kube-linter-action", "Swatinem/rust-cache": "Swatinem/rust-cache", "SwiftDocOrg/github-wiki-publish-action": "SwiftDocOrg/github-wiki-publish-action", "SwiftDocOrg/swift-doc": "SwiftDocOrg/swift-doc", "tj-actions/changed-files": "tj-actions/changed-files", "yogevbd/enforce-label-action": "yogevbd/enforce-label-action"}

0 comments on commit cc0b05f

Please sign in to comment.