Skip to content

Commit

Permalink
use absolute path and env
Browse files Browse the repository at this point in the history
  • Loading branch information
elchead committed Nov 16, 2023
1 parent 76dd2fd commit 760b4a7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/actions/gh_create_issue/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ inputs:
description: "The body of the issue."
required: false
body-file:
description: "The path to a file containing the body of the issue."
description: "The absolute path to a file containing the body of the issue."
required: false
assignee:
description: "The GitHub username to assign the issue to."
Expand Down
10 changes: 5 additions & 5 deletions .github/actions/gh_create_issue/create_issue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ function setFields() {
function main() {
inputFile="$(realpath "${1}")"

#workdir=$(mktemp -d)
#pushd "${workdir}" > /dev/null
#trap 'debug "not cleaning up, working directory at: ${workdir}"' ERR
workdir=$(mktemp -d)
pushd "${workdir}" > /dev/null
trap 'debug "not cleaning up, working directory at: ${workdir}"' ERR

issueURL=$(createIssue)
echo "${issueURL}"
Expand All @@ -241,8 +241,8 @@ function main() {

setFields "${projectID}" "${issueItemID}"

#popd > /dev/null
#rm -rf "${workdir}"
popd > /dev/null
rm -rf "${workdir}"
}

main "${@}"
19 changes: 9 additions & 10 deletions .github/actions/notify_e2e_failure/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ runs:
- name: Get the current date
id: date
shell: bash
run: echo "::set-output name=date::$(date +'%Y-%m-%d %H:%M:%S')"
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV

- name: Create body template
id: body-template
Expand All @@ -53,29 +53,28 @@ runs:
EOF
cat header.md .github/failure_project_template.md > .github/body.md
- run: cat .github/body.md
shell: bash
cat header.md .github/failure_project_template.md > body.md
echo "BODY_PATH=$(pwd)/body.md" >> $GITHUB_ENV
- uses: ./.github/actions/gh_create_issue
id: gh_create_issue
with:
title: "${{ inputs.test }} - ${{ steps.date.outputs.date }}"
#body: test // TODO
body-file: .github/body.md
title: "${{ inputs.test }} - ${{ env.CURRENT_DATE }}"
body-file: ${{ env.BODY_PATH }}
repo: issues
label: "e2e failure"
workflow: ${{ github.workflow }}
assignee: ${{ steps.pick-assignee.outputs.assignee }}
project: Constellation bugs
fields: |
workflow: ${{ github.workflow }}
kubernetesVersion: ${{ inputs.kubernetesVersion }}
cloudProvider: ${{ inputs.provider }}
test: ${{ inputs.test }}
refStream: ${{ inputs.refStream }}
token: ${{ inputs.projectWriteToken }}
- run: echo ${{ steps.gh_create_issue.outputs.issue-url }} # TODO rm

- name: Issue URL
run: echo ${{ steps.gh_create_issue.outputs.issue-url }} # TODO rm
shell: bash

- name: Create project card in case of failure
Expand Down

0 comments on commit 760b4a7

Please sign in to comment.