Skip to content

Commit

Permalink
WIP: Testing with manual auth 3
Browse files Browse the repository at this point in the history
  • Loading branch information
henriqueaklein committed Aug 8, 2024
1 parent 9ae94ce commit 8c57b47
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions .github/workflows/build-targets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,19 @@ on:
workflow_dispatch:

jobs:
authenticate:
runs-on: ubuntu-latest
steps:
- name: Authenticate GitHub CLI
run: |
echo "${{ secrets.GH_TOKEN }}" | gh auth login --with-token
gh auth status
- name: Save authentication status
run: |
echo "Authentication successful"
continue-on-error: true
setup-src-cache:
needs: authenticate
runs-on: ubuntu-latest
outputs:
THIRD_PARTY_CACHE_NAME_KEY: ${{ steps.tp-check.outputs.THIRD_PARTY_CACHE_NAME_KEY }}
Expand All @@ -21,13 +33,6 @@ jobs:
with:
submodules: false

- name: Authenticate GitHub CLI
run: |
echo $GH_TOKEN | gh auth login --with-token
gh auth status
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Install GH cli extension actions-cache
run: |
gh extension install actions/gh-actions-cache
Expand Down Expand Up @@ -309,7 +314,7 @@ jobs:
working-directory: ${{github.workspace}}

save-target-sources:
needs: [setup-src-cache, cache-src, create-targets-matrix]
needs: [authenticate, setup-src-cache, cache-src, create-targets-matrix]
if: |
always() &&
needs.setup-src-cache.result == 'success' &&
Expand All @@ -323,12 +328,6 @@ jobs:
build-type: [Release, Debug]
runs-on: ubuntu-latest
steps:
- name: Authenticate GitHub CLI
run: |
echo $GH_TOKEN | gh auth login --with-token
gh auth status
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Setup
run: |
sudo apt install zstd -y
Expand Down Expand Up @@ -475,7 +474,7 @@ jobs:
build-targets-matrix:
needs:
[setup-src-cache, cache-src, create-targets-matrix, save-target-sources]
[authenticate, setup-src-cache, cache-src, create-targets-matrix, save-target-sources]
if: |
always() &&
needs.setup-src-cache.result == 'success' &&
Expand Down Expand Up @@ -941,6 +940,8 @@ jobs:
${{ matrix.target-save-data.upload-release-json }}
done
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Upload JSON file release on build failure
if: ${{ failure() && steps.build-updated-libraries.conclusion == 'failure' }}
Expand Down Expand Up @@ -971,6 +972,8 @@ jobs:
((numberOfTries++))
done
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Save target OS SDK as github release
shell: bash
Expand Down Expand Up @@ -1030,3 +1033,5 @@ jobs:
jq <<< $jsonStr > release.json
${{ matrix.target-save-data.upload-release-json }}
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}

0 comments on commit 8c57b47

Please sign in to comment.