Skip to content

Commit

Permalink
chore: add token file read for register source
Browse files Browse the repository at this point in the history
  • Loading branch information
florianow committed Nov 7, 2024
1 parent 248172e commit a226925
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
uses: ./
with:
base_url: 'https://federation.dev.meshcloud.io'
bb_run_uuid: '64936cf04-26f8-456c-b6b0-4c0ca91ca24b'
bb_run_uuid: 'c087f5e4-f494-437c-9162-27d7467e3fba'
steps: |
[
{ "id": "terraform-validate", "displayName": "terraform validate" },
Expand Down
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async function run() {
headers: {
'Content-Type': 'application/vnd.meshcloud.api.meshbuildingblockrun.v1.hal+json',
'Accept': 'application/vnd.meshcloud.api.meshbuildingblockrun.v1.hal+json',
'Authorization': `Bearer ${token}`
'Authorization': `Bearer ${fileToken}`
}
});
core.setOutput('response', response.data);
Expand All @@ -97,7 +97,7 @@ async function run() {
catch (registerError) {
if (axios_1.default.isAxiosError(registerError)) {
if (registerError.response) {
core.error(`Register source error response: ${registerError.response.data}`);
core.error(`Register source error response: ${JSON.stringify(registerError.response.data)}`);
core.error(`Status code: ${registerError.response.status}`);
}
else {
Expand All @@ -113,7 +113,7 @@ async function run() {
catch (authError) {
if (axios_1.default.isAxiosError(authError)) {
if (authError.response) {
core.error(`Authentication error response: ${authError.response.data}`);
core.error(`Authentication error response: ${JSON.stringify(authError.response.data)}`);
core.error(`Status code: ${authError.response.status}`);
}
else {
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async function run() {
headers: {
'Content-Type': 'application/vnd.meshcloud.api.meshbuildingblockrun.v1.hal+json',
'Accept': 'application/vnd.meshcloud.api.meshbuildingblockrun.v1.hal+json',
'Authorization': `Bearer ${token}`
'Authorization': `Bearer ${fileToken}`
}
}
);
Expand All @@ -79,7 +79,7 @@ async function run() {
} catch (registerError) {
if (axios.isAxiosError(registerError)) {
if (registerError.response) {
core.error(`Register source error response: ${registerError.response.data}`);
core.error(`Register source error response: ${JSON.stringify(registerError.response.data)}`);
core.error(`Status code: ${registerError.response.status}`);
} else {
core.error(`Register source error message: ${registerError.message}`);
Expand All @@ -92,7 +92,7 @@ async function run() {
} catch (authError) {
if (axios.isAxiosError(authError)) {
if (authError.response) {
core.error(`Authentication error response: ${authError.response.data}`);
core.error(`Authentication error response: ${JSON.stringify(authError.response.data)}`);
core.error(`Status code: ${authError.response.status}`);
} else {
core.error(`Authentication error message: ${authError.message}`);
Expand Down

0 comments on commit a226925

Please sign in to comment.