-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert most circleci changes since 1.3.2
- Loading branch information
Showing
8 changed files
with
90 additions
and
332 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
set -xeuo pipefail | ||
IFS=$'\n\t' | ||
|
||
if [[ -z "${BRANCH}" ]]; then | ||
TARGET="\"branch\": \"main\"" | ||
elif [[ "${BRANCH}" =~ "refs/tags" ]]; then | ||
TAG=$(echo "${BRANCH}" | sed 's:refs/tags/::') | ||
TARGET="\"tag\": \"${TAG}\"" | ||
else | ||
TARGET="\"branch\": \"${BRANCH}\"" | ||
fi | ||
|
||
curl --fail -X POST --header "Content-Type: application/json" --header "Circle-Token: ${CIRCLE_TOKEN}" -d "{ | ||
\"parameters\": { | ||
\"GHA_Action\": \"trigger_pipeline\" | ||
}, | ||
${TARGET} | ||
}" https://circleci.com/api/v2/project/gh/bacalhau-project/bacalhau/pipeline |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Trigger on Label | ||
|
||
on: | ||
pull_request: | ||
types: [labeled] | ||
|
||
jobs: | ||
trigger-workflows: | ||
if: github.event.label.name == 'ok-to-test' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install yq | ||
run: sudo snap install yq | ||
|
||
- name: Check if labeler is authorized | ||
id: check-authorization | ||
run: | | ||
LABELER=$(jq --raw-output .sender.login "$GITHUB_EVENT_PATH") | ||
APPROVERS=$(yq e '.approvers[]' OWNERS) | ||
if echo "$APPROVERS" | grep -Fxq "$LABELER"; then | ||
echo "::set-output name=authorized::true" | ||
else | ||
echo "::set-output name=authorized::false" | ||
fi | ||
- name: Dispatch event | ||
if: steps.check-authorization.outputs.authorized == 'true' | ||
uses: peter-evans/repository-dispatch@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
event-type: ok-to-test |
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
Oops, something went wrong.