Skip to content

Commit

Permalink
Cleanup enviornment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
hvidy committed Feb 14, 2024
1 parent 6929813 commit 62ee087
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions .github/workflows/approve-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,8 @@ jobs:
ISSUE_NUMBER: ${{ github.event.issue.number }}
run: |
AUTHORIZED=$(python3 .github/scripts/approval_authorization.py)
echo ${AUTHORIZED}
echo "authorized=${AUTHORIZED}" >> $GITHUB_OUTPUT
- name: debug
run: |
echo ${{ steps.verify_labeler.outputs.authorized }}
- name: comment if unauthorized
if: ${{ ! steps.verify_labeler.outputs.authorized }}
uses: GrantBirki/comment@v2.0.8
Expand All @@ -112,7 +107,7 @@ jobs:

createNewRepo:
needs: createRepoAuthorization
if: ${{ needs.createRepoAuthorization.outputs.authorized }} == "True"
if: ${{ needs.createRepoAuthorization.outputs.authorized }}
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -131,22 +126,22 @@ jobs:
id: create-model-repo
env:
GITHUB_TOKEN: ${{ secrets.DAN_PAT }}
OWNER: ModelAtlasOfTheEarth
SUBMITTER: ${{ github.event.issue.user }}
OWNER: ${{ github.event.repository.owner.login }}
SUBMITTER: ${{ github.event.issue.user.login }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
TEMPLATE: ModelAtlasOfTheEarth/mate_model_template
TEMPLATE: mate_model_template
FLAGS: --public
run: |
REPO_NAME=$(python3 .github/scripts/generate_identifier.py)
gh repo create ${OWNER}/${REPO_NAME} --template $TEMPLATE $FLAGS
gh api --method=PUT "repos/${OWNER}/${REPO_NAME}/collaborators/${SUBMITTER}" -f permission=admin
gh repo create ${OWNER}/${REPO_NAME} --template ${OWNER}/$TEMPLATE $FLAGS
echo "repo_name=${REPO_NAME}" >> $GITHUB_OUTPUT
gh api --method=PUT "repos/${OWNER}/${REPO_NAME}/collaborators/${SUBMITTER}" -f permission=admin
# parse metadata and write files to repo
- name: write metadata
env:
GITHUB_TOKEN: ${{ secrets.DAN_PAT }}
OWNER: ModelAtlasOfTheEarth
OWNER: ${{ github.event.repository.owner.login }}
REPO: ${{ steps.create-model-repo.outputs.repo_name }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
run: |
Expand Down

0 comments on commit 62ee087

Please sign in to comment.