Skip to content

Commit

Permalink
adding config + pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorOKane-Kainos committed Jul 5, 2024
1 parent 3f5b854 commit 4634d79
Showing 1 changed file with 19 additions and 21 deletions.
40 changes: 19 additions & 21 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:
id-token: write
contents: read

jobs:
jobs:
deploy-infra:
runs-on: ubuntu-latest
steps:
Expand All @@ -33,29 +33,27 @@ jobs:
run: |
az account show
- name: Install jq
run: |
sudo apt-get install jq -y
- name: List all Repositories and Branches from JSON file
run: |
echo "Checking Repositories and Branches"
cat ./components/test-repos.json
for repo in $(jq -r '.[]' ./components/test-repos.json); do
echo "Checking repository: $repo"
curl -H "Authorization: token ${{ secrets.PAT_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/hmcts/$repo
- name: Install jq
run: |
sudo apt-get install jq -y
- name: Debug Repositories and Branches
run: |
echo "Checking Repositories and Branches"
cat ./components/test-repos.json
for repo in $(jq -r '.[]' ./components/test-repos.json); do
echo "Checking repository: $repo"
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
for branch in main master; do
echo "Checking branch: $branch in repository: $repo"
curl -H "Authorization: token ${{ secrets.PAT_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/hmcts/$repo
for branch in main master; do
echo "Checking branch: $branch in repository: $repo"
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/hmcts/$repo/branches/$branch
done
https://api.github.com/repos/hmcts/$repo/branches/$branch
done

done
- name: Terraform Init
working-directory: components
Expand Down

0 comments on commit 4634d79

Please sign in to comment.