Skip to content

Commit

Permalink
Actions: skip unsupported uses strings (#8026)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakecoffman authored Sep 13, 2023
1 parent 76a6be0 commit 6dc3ee9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def workfile_file_dependencies(file)

uses_strings.each do |string|
# TODO: Support Docker references and path references
next if string.start_with?(".", "docker://")
next unless string.match?(GITHUB_REPO_REFERENCE)

dep = build_github_dependency(file, string)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,14 @@ def mock_service_pack_request(nwo)
end
end

describe "with a local reusable workflow dependency" do
let(:workflow_file_fixture_name) { "local_workflow.yml" }

it "does not treat the path like a dependency" do
expect(dependencies).to eq([])
end
end

describe "with composite actions" do
let(:workflow_file_fixture_name) { "composite_action.yml" }
let(:workflow_files) do
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
on:
pull_request:

jobs:
test:
uses: ./.github/actions/test.yml

0 comments on commit 6dc3ee9

Please sign in to comment.