diff --git a/.devcontainer/load-env.sh b/.devcontainer/load-env.sh index 044ced4..d37bab6 100644 --- a/.devcontainer/load-env.sh +++ b/.devcontainer/load-env.sh @@ -18,14 +18,9 @@ else echo "Environment file not found: $ENV_FILE_PATH" fi -# Prompt user to input NugetApiKey if it's not already set -if [ -z "$NugetApiKey" ]; then - read -e -p "Please enter your NugetApiKey: " NugetApiKey - export NugetApiKey - echo "NugetApiKey set." -else - echo "NugetApiKey already set." -fi +# Use the GitHub secret for NuGetApiKey +export NugetApiKey="${{ secrets.TRI_MONTHLY_TEMPO }}" +echo "NugetApiKey set from GitHub secret." # Print the important variables echo "Current Environment Variables:" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..91cb884 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +name: CI + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up environment + env: + NugetApiKey: ${{ secrets.TRI_MONTHLY_TEMPO }} # Access the secret here + run: | + echo "Running load-env.sh script with NugetApiKey" + echo "NugetApiKey is set to: $NugetApiKey" # Avoid printing the actual secret in logs + bash /workspaces/PersistedAssemblyBuilder.ConsoleApp/.devcontainer/load-env.sh