Skip to content

Commit

Permalink
try another way to get the secret
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhathcock committed May 14, 2024
1 parent 2aeecdf commit ca9cd65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.x.x

- name: Set up secret file
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo $GITHUB_TOKEN >> secrets.txt
- name: Build Installers
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | sed 's/./& /g'
RUN_ID: ${{ github.run_id }}
run: ./build.ps1 build-installers
4 changes: 2 additions & 2 deletions Build/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ IEnumerable<string> GetFiles(string d)
BUILD_INSTALLERS,
async () =>
{
var token = Environment.GetEnvironmentVariable("GITHUB_TOKEN");
var token = File.ReadAllText("secrets.txt");
var runId = Environment.GetEnvironmentVariable("RUN_ID");
Console.WriteLine($"Found: {runId} and {string.IsNullOrEmpty(token)}");
Console.WriteLine($"Found: {runId} and {token.Length}");
await Github.BuildInstallers(token, runId).ConfigureAwait(false);
}
);
Expand Down

0 comments on commit ca9cd65

Please sign in to comment.