Skip to content

Commit 9c936bd

Browse files
committed
Debug token fetch
1 parent de19122 commit 9c936bd

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,24 @@ jobs:
5353
pip install --upgrade pip
5454
pip install boto3
5555
56+
# TODO: Move to AMI setup
57+
- name: Install jq
58+
run: |
59+
sudo apt-get update
60+
sudo apt-get install -y jq
61+
5662
- name: Get GitHub runner registration token
5763
id: reg-token
5864
run: |
59-
TOKEN=$(curl -fsSX POST \
65+
RESPONSE=$(curl -sS -X POST \
6066
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
6167
-H "Accept: application/vnd.github+json" \
62-
"https://api.github.com/repos/${{ github.repository }}/actions/runners/registration-token" \
63-
| jq -r .token)
68+
-H "X-GitHub-Api-Version: 2022-11-28" \
69+
"https://api.github.com/repos/${{ github.repository }}/actions/runners/registration-token")
70+
echo "$RESPONSE" | jq .
71+
TOKEN=$(echo "$RESPONSE" | jq -r .token)
72+
test "$TOKEN" != "null"
73+
test -n "$TOKEN"
6474
echo "token=$TOKEN" >> "$GITHUB_OUTPUT"
6575
6676
- name: Launch EC2 instance

scripts/setup_ami.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ sudo DEBIAN_FRONTEND=noninteractive apt-get upgrade -y
1212

1313
# Core toolchain + OpenMC prerequisites + benchmarking utilities
1414
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
15-
build-essential g++ gfortran cmake git wget \
15+
build-essential g++ gfortran cmake git wget jq \
1616
python${PYVER} python${PYVER}-venv python${PYVER}-dev python3-pip \
1717
openmpi-bin libopenmpi-dev libhdf5-openmpi-dev libpng-dev libpugixml-dev \
1818
libfmt-dev libeigen3-dev libnetcdf-dev libtbb-dev numactl libembree-dev time

0 commit comments

Comments
 (0)