Skip to content

Commit

Permalink
add metadata upload targets
Browse files Browse the repository at this point in the history
  • Loading branch information
Naveen-is-here committed Jun 19, 2024
1 parent cd2784f commit da5ee4c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/update-dependencies-from-metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
schedule:
- cron: '57 13 * * *' # daily at 13:57 UTC

env:
AWS_REGION : "us-east-1"
permissions:
id-token: write # This is required for requesting the JWT
contents: write # This is required for actions/checkout


jobs:
retrieve:
name: Retrieve New Versions and Generate Metadata
Expand Down Expand Up @@ -221,6 +228,12 @@ jobs:
echo "artifact-file=$(basename ./*.tgz)" >> "$GITHUB_OUTPUT"
echo "checksum-file=$(basename ./*.tgz.checksum)" >> "$GITHUB_OUTPUT"
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.ROLE }}
aws-region: ${{ env.AWS_REGION }}
- name: Get Checksum
id: get-checksum
run: echo "checksum=$(cat ${{ steps.get-file-names.outputs.checksum-file }})" >> "$GITHUB_OUTPUT"
Expand Down
4 changes: 2 additions & 2 deletions dependency/retrieval/retrieve.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ func generateMetadata(hasVersion versionology.VersionFetcher) ([]versionology.De
Licenses: retrieve.LookupLicenses(nginxURL, decompress),
PURL: retrieve.GeneratePURL("nginx", nginxVersion, sourceSHA, nginxURL),
CPE: fmt.Sprintf("cpe:2.3:a:nginx:nginx:%s:*:*:*:*:*:*:*", nginxVersion),
Stacks: []string{"io.buildpacks.stacks.bionic"},
Stacks: []string{"Initializ Distroless Stack"},
}

bionicDependency, err := versionology.NewDependency(dep, "bionic")
if err != nil {
return nil, fmt.Errorf("could get sha: %w", err)
}

dep.Stacks = []string{"io.buildpacks.stacks.jammy"}
dep.Stacks = []string{"Initializ Distroless Stack"}

jammyDependency, err := versionology.NewDependency(dep, "jammy")
if err != nil {
Expand Down

0 comments on commit da5ee4c

Please sign in to comment.