Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃尡 Bump docker tag for new release. #1055

Merged
merged 1 commit into from Dec 21, 2022

Conversation

spencerschrock
Copy link
Contributor

Signed-off-by: Spencer Schrock sschrock@google.com

I've manually tested the action, as the steps in RELEASE.md don't actually test any new changes since the docker image is pinned to a version.

I've tested with this command and confirmed the original bug (ossf/scorecard#2557) is fixed.

docker run -e INPUT_REPO_TOKEN="$GITHUB_AUTH_TOKEN" \
    -e INPUT_POLICY_FILE="/policy.yml" \
    -e INPUT_RESULTS_FORMAT="sarif" \
    -e INPUT_RESULTS_FILE="results.sarif" \
    -e INPUT_PUBLISH_RESULTS="false" \
    -e GITHUB_WORKSPACE="/github/workflow" \
    -e GITHUB_REF="refs/heads/main" \
    -e GITHUB_EVENT_NAME="branch_protection_rule" \
    -e GITHUB_EVENT_PATH="/testdata/test.json" \
    -e GITHUB_REPOSITORY="nginxinc/nginx-kubernetes-gateway" \
    -e GITHUB_API_URL="https://api.github.com/" \
    -v $PWD:/github/workflow \
    gcr.io/openssf/scorecard-action:latest

Signed-off-by: Spencer Schrock <sschrock@google.com>
Copy link
Contributor

@laurentsimon laurentsimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the RELEASE.md needs to move the section on testing to after the section on updating the tag.

@codecov
Copy link

codecov bot commented Dec 21, 2022

Codecov Report

Merging #1055 (3670aca) into main (7da02bf) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1055   +/-   ##
=======================================
  Coverage   62.94%   62.94%           
=======================================
  Files           4        4           
  Lines         251      251           
=======================================
  Hits          158      158           
  Misses         77       77           
  Partials       16       16           

@spencerschrock
Copy link
Contributor Author

I think the RELEASE.md needs to move the section on testing to after we've updated the tag

Until the release happens, the newly tagged Docker image won't exist. So doing it after the tag but before the release also won't work.

I think we need a test version of action.yaml which uses gcr.io/openssf/scorecard-action:latest

@laurentsimon
Copy link
Contributor

laurentsimon commented Dec 21, 2022

I think the RELEASE.md needs to move the section on testing to after we've updated the tag

Until the release happens, the newly tagged Docker image won't exist. So doing it after the tag but before the release also won't work.

Yeah, I meant after release as well. But too late if it's broken.

I think we need a test version of action.yaml which uses gcr.io/openssf/scorecard-action:latest

What is latest in this case? It still points to an old Action release, does it not?

Or we need to cut a v1.2.3-rc and use that instead to test before the actual release?

@spencerschrock spencerschrock merged commit e38b190 into ossf:main Dec 21, 2022
@spencerschrock spencerschrock deleted the bump-docker-v2.1.2 branch December 21, 2022 23:13
@spencerschrock
Copy link
Contributor Author

spencerschrock commented Dec 22, 2022

I think we need a test version of action.yaml which uses gcr.io/openssf/scorecard-action:latest

What is latest in this case? It still points to an old Action release, does it not?

Or we need to cut a v1.2.3-rc and use that instead to test before the actual release?

So right now RELEASE.md mentions a manual dispatch of scorecards.yml which calls our public action.yaml

# This is a pre-submit / pre-release.
- name: "Run analysis"
uses: ossf/scorecard-action@main
with:

But ossf/scorecard-action@main is pinned to a specific docker version, so it will always run an old docker release:

runs:
using: "docker"
image: "docker://gcr.io/openssf/scorecard-action:v2.1.2"

I think we need to change our test version ofscorecards.yml to use a private action which references the latest docker image, which will have the changes we're trying to test. We need to setup a private action which has the following lines

runs:
  using: "docker"
  image: "docker://gcr.io/openssf/scorecard-action:latest"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants