Skip to content

Commit

Permalink
Update action.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
eq19 committed Oct 3, 2024
1 parent 00de8a4 commit a2c539a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
17 changes: 11 additions & 6 deletions .github/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ runs:
RUNNER_ID=$(gh api -H "${HEADER}" /repos/${{ github.repository }}/actions/runners --jq '.runners.[].id')
if (( $TOTAL_COUNT != 0 )); then gh api --method DELETE -H "${HEADER}" /repos/${{ github.repository }}/actions/runners/${RUNNER_ID}; fi
- name: 💎 Set Credential
if: runner.os == 'Windows'
- name: 💎 Set ID Token
if: runner.os != 'Windows'
id: 'auth'
uses: 'google-github-actions/auth@v2'
with:
Expand All @@ -111,12 +111,11 @@ runs:

#Ref: https://github.com/google-github-actions/auth/blob/main/docs/EXAMPLES.md#generating-an-id-token-jwt
- name: Run identity
if: runner.os == 'Windows'
if: runner.os != 'Windows'
shell: bash
run: |
IDENTITY=${{ steps.auth.outputs.id_token }}
curl -s -X POST https://us-central1-feedmapping.cloudfunctions.net/function \
-H "Authorization: Bearer $IDENTITY" -H "Content-Type: application/json" -d '{}'
-H "Authorization: Bearer ${{ steps.auth.outputs.id_token }}" -H "Content-Type: application/json" -d '{}'
- name: 💎 Setup Gcloud
if: runner.os == 'Windows'
Expand All @@ -137,7 +136,13 @@ runs:
echo "deleted: ${instance_zone}/${instance_name}"
fi
done
echo 'DATASET_URL='$(gcloud functions describe function --gen2 --region="us-central1" --format="value(serviceConfig.uri)") > ${GITHUB_ENV}
# Ref: https://cloud.google.com/compute/docs/instances/create-start-instance
- name: 💎 Remove Existing Self-Hosted Runner
if: runner.os == 'Windows'
shell: bash
run: |
YQ=$(choco install yq)
BASE="D:/a/_actions/eq19/eq19/v1/.github"
$BASE/entrypoint/init.sh
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
credentials: ${{ secrets.GCP_CREDENTIALS }}
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
docker_hub_password: ${{ secrets.DOCKER_HUB_PASSWORD }}
initiate_pauli: ${{ toJSON(steps.set-lexering.outputs) }}

- name: 🪂 Feed Mapping
uses: eq19/feed@v3
Expand All @@ -74,16 +75,19 @@ jobs:
credentials: ${{ secrets.GCP_CREDENTIALS }}
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
docker_hub_password: ${{ secrets.DOCKER_HUB_PASSWORD }}
initiate_pauli: ${{ toJSON(steps.build-parser.outputs) }}

- name: 🏃‍♂️ Lexering Runner
uses: eq19/lexer@v1
id: set-lexering
with:
token: ${{ secrets.ACCESS_TOKEN }}
credentials: ${{ secrets.GCP_CREDENTIALS }}
#private_key: ${{ secrets.GCP_SSH_PRIVATE_KEY }}
docker_hub_token: ${{ secrets.DOCKER_HUB_TOKEN }}
docker_hub_password: ${{ secrets.DOCKER_HUB_PASSWORD }}

initiate_pauli: ${{ toJSON(steps.feed-mapping.outputs) }}

outputs:
# ♻️ Simulate Gell-Mann Matrices
id: ${{ join(steps.build-parser.outputs.*, '\n') }}
Expand Down

0 comments on commit a2c539a

Please sign in to comment.