-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 1.13 KB
/
alma.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
on:
workflow_dispatch:
push:
branches:
- main
jobs:
alma:
permissions:
id-token: 'write'
contents: read
runs-on: ubuntu-latest
steps:
# We'll need to check out the repository so that we can edit the README.
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Let's get all the branches.
- name: Dependencies Extraction
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ACTIONS_ID_TOKEN_REQUEST_TOKEN: ${{vars.ACTIONS_ID_TOKEN_REQUEST_TOKEN}}
ACTIONS_ID_TOKEN_REQUEST_URL: ${{vars.ACTIONS_ID_TOKEN_REQUEST_URL}}
run: |
sudo apt install -y jq
chmod +x dep-extractor &&
OUT=$(./dep-extractor) &&
echo $OUT &&
echo "Start" &&
AUTH=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=api://alma" | jq .value) &&
echo "Next" &&
curl -X POST -H "Content-Type: application/json" -H "authorization: $AUTH" --data "$OUT" "https://aji6rwhah0.execute-api.eu-south-1.amazonaws.com/v2/action"