forked from paketo-buildpacks/dep-server
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (56 loc) · 2.31 KB
/
bundler-test-upload-metadata.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Bundler Test and Upload Metadata
"on":
repository_dispatch:
types:
- bundler-test
env:
DEP_NAME: bundler
REQUIRED_DEP: ruby
jobs:
test-upload-metadata:
name: Test Dependency and Upload Metadata
runs-on: ubuntu-18.04
steps:
- name: Get required dependency
id: required-dependency
run: |
uri="$(curl -sL "https://api.deps.paketo.io/v1/dependency?name=${{ env.REQUIRED_DEP }}" | jq -r '. |= sort_by(.version) | reverse[0].uri')"
echo "::set-output name=uri::${uri}"
- name: Test
uses: paketo-buildpacks/dep-server/actions/test-dependency@main
with:
name: ${{ env.DEP_NAME }}
version: ${{ github.event.client_payload.version }}
dependency_url: ${{ github.event.client_payload.uri }}
required_dependency: ${{ steps.required-dependency.outputs.uri }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Modify CPE for Upload
id: modify-cpe
run: |
cpe="$(echo '${{ github.event.client_payload.cpe }}' | sed 's|\\|\\\\|g')"
echo "::set-output name=cpe::${cpe}"
- name: Convert Version to Semantic Version
id: semantic-version
uses: paketo-buildpacks/dep-server/actions/convert-semver@main
with:
version: ${{ github.event.client_payload.version }}
- name: Upload dependency metadata
uses: paketo-buildpacks/dep-server/actions/upload-metadata@main
with:
bucket-name: ${{ secrets.DEPS_BUCKET }}
dependency-name: ${{ env.DEP_NAME }}
version: ${{ steps.semantic-version.outputs.sem-version }}
sha256: ${{ github.event.client_payload.sha256 }}
uri: ${{ github.event.client_payload.uri }}
stacks: '[{"id":"io.buildpacks.stacks.bionic"}]'
source-uri: ${{ github.event.client_payload.source_uri }}
source-sha256: ${{ github.event.client_payload.source_sha256 }}
deprecation-date: ${{ github.event.client_payload.deprecation_date }}
cpe: ${{ steps.modify-cpe.outputs.cpe }}
purl: ${{ github.event.client_payload.purl }}
licenses: ${{ github.event.client_payload.licenses }}