diff --git a/.github/action.yml b/.github/action.yml index 3b4d492876a37b..3d90ee15941879 100644 --- a/.github/action.yml +++ b/.github/action.yml @@ -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: @@ -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' @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 01599b4ee33846..9df86133669fda 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -74,6 +75,7 @@ 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 @@ -81,9 +83,11 @@ jobs: 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') }}