diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml new file mode 100644 index 0000000..30b852a --- /dev/null +++ b/.github/workflows/test-integration.yml @@ -0,0 +1,26 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + +name: test main integration +# This workflow validates the merged code functions exactly as an invoking workflow might use it. +# Due to the requiremnet that `uses` be a hard-coded value, we can only validate explicit git refs. +# In this case, we validate once a PR has been merged, main branch functions correctly + +on: + pull_request: + types: [closed] + +permissions: + contents: read + +jobs: + main-merge: + runs-on: ubuntu-latest + if: github.event.pull_request.merged == true + steps: + - uses: hashicorp/action-slack-status@main + with: + success-message: "Merge successfull" + status: ${{job.status + slack-webhook-url: ${{secrets.slack_webhook_url_feed_releng_test}} + diff --git a/action.yml b/action.yml index 1073119..a34fb64 100644 --- a/action.yml +++ b/action.yml @@ -45,7 +45,7 @@ runs: with: # github-token: uncomment-this-line-for-local-act-testing script: | - return require('./main.js')({context, core}) + return require(process.env.GITHUB_ACTION_PATH + '/main.js')({context, core}) - name: Send Status uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 # v1.23.0 env: