forked from aws/s2n-tls
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: keep start_codebuild.sh up-to-date
- Loading branch information
Showing
2 changed files
with
38 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,3 +128,38 @@ jobs: | |
exit 1 | ||
- name: Success | ||
run: echo "All nix files passed format check" | ||
|
||
validate_start_codebuild_script: | ||
name: validate start_codebuild.sh | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: pause | ||
run: "sleep 120" | ||
- name: retrieve statuses | ||
id: get_statuses | ||
uses: octokit/[email protected] | ||
with: | ||
route: GET /repos/{repo}/commits/{ref}/statuses?per_page=100 | ||
repo: ${{ github.repository }} | ||
ref: ${{ github.sha }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: check start_codebuild.sh against statuses | ||
id: github_builds | ||
run: | | ||
from_github=$( | ||
jq '.[] | .description' <<< '${{ steps.get_statuses.outputs.data }}' \ | ||
| grep "for project" \ | ||
| sed -r "s/^.*?for project (.*?)\"$/\1/" \ | ||
| sort -u | ||
) | ||
echo builds from github statuses: | ||
echo "$from_github" | ||
from_file=$( | ||
source codebuild/bin/start_codebuild.sh > /dev/null \ | ||
|| printf "%s\n" "${BUILDS[@]}" | cut -d" " -f1 | sort -u | ||
) | ||
echo builds from start_codebuild.sh: | ||
echo "$from_file" | ||
diff <(echo "$from_github") <(echo "$from_file") |
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