Skip to content

Commit

Permalink
.github: fixup 12
Browse files Browse the repository at this point in the history
  • Loading branch information
gtjoseph committed Feb 16, 2025
1 parent e5a0ee2 commit a1468de
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 56 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/AsteriskPRChanged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ env:
jobs:
PRChanged2:
name: "run-check"
permissions:
actions: read
checks: read
contents: read
issues: read
pull-requests: read
statuses: read
uses: ./.github/workflows/AsteriskPRChanged2.yml

Cleanup:
Expand All @@ -55,12 +62,6 @@ jobs:
run: |
# Wait then get testsuite PR
wget -qO asterisk-ci-actions.tar.gz \
https://github.com/${ACTIONS_OWNER}/${ACTIONS_REPO}/archive/refs/heads/${ACTIONS_BRANCH}.tar.gz
tar -xf asterisk-ci-actions.tar.gz --transform="s/^${ACTIONS_REPO}-${ACTIONS_BRANCH}/asterisk-ci-actions/g"
ls -al
echo "SOME_VARIABLE: ${SOMEVAR}"
gh --repo ${REPO} pr edit ${PR_NUMBER} --add-label bug
echo "${GITHUB_TOKEN}" | md5sum
echo "${GH_TOKEN}" | md5sum
34 changes: 3 additions & 31 deletions .github/workflows/AsteriskPRChanged2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,6 @@ on:
required: false
default: '{ "owner": "asterisk", "repo": "asterisk-ci-actions", "branch": "main" }'

permissions:
actions: read
# attestations: read|write|none
checks: read
contents: read
# deployments: read|write|none
# id-token: write|none
issues: read
# discussions: read|write|none
# packages: read|write|none
# pages: read|write|none
pull-requests: read
# repository-projects: read|write|none
# security-events: read|write|none
statuses: read

env:
REPO: ${{ github.repository }}
REPO_DIR: ${{ github.workspace }}/${{ github.event.repository.name }}
Expand All @@ -46,12 +30,9 @@ jobs:
steps:
- id: setup
run: |
mkdir cacheit
ls -al > cacheit/dirlist.txt
mkdir output
ls -al > output/dirlist2.txt
echo "XXX${{ secrets.SOME_SECRET }}XXX" > output/test.out
echo "VVV${{ vars.SOME_VARIABLE }}VVV" >> output/test.out
echo "${GITHUB_TOKEN}" | md5sum
echo "${GH_TOKEN}" | md5sum
# - id: cache-build-output
# name: CacheBuildProducts
Expand All @@ -60,13 +41,4 @@ jobs:
# path: cacheit
# key: Cleanup2-${{ env.PR_NUMBER }}

- name: Save Output
if: always()
id: save-output
uses: actions/upload-artifact@v4
with:
name: Cleanup2-${{ env.PR_NUMBER }}
if-no-files-found: ignore
path: output


24 changes: 7 additions & 17 deletions .github/workflows/OnPRChanged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ env:
GH_TOKEN: ${{ github.token }}

jobs:
PRChanged:
name: "run-check"
concurrency:
group: check-${{ github.base_ref }}-${{ github.ref_name }}
cancel-in-progress: true
uses: ./.github/workflows/AsteriskPRChanged.yml

Cleanup0:
needs: [ PRChanged ]
if: ${{ always() }}
Expand All @@ -49,15 +42,12 @@ jobs:
- id: setup
run: |
mkdir output
echo "SSS${{ secrets.SOME_SECRET }}SSS" > output/xxx.txt
echo "${GITHUB_TOKEN}" | md5sum
- name: Save Output
if: always()
id: save-output
uses: actions/upload-artifact@v4
with:
name: Cleanup0-${{ env.PR_NUMBER }}
if-no-files-found: ignore
path: output
PRChanged:
name: "run-check"
concurrency:
group: check-${{ github.base_ref }}-${{ github.ref_name }}
cancel-in-progress: true
uses: ./.github/workflows/AsteriskPRChanged.yml


0 comments on commit a1468de

Please sign in to comment.