1

I have some github workflows using secrets in the repository.

I created the secret, but I used the wrong value for it so I went on the website again and updated the value to a different string.

It seems though that no matter what I do, the value doesn't change when the workflow is running. Outputting the value to the console shows the initial value that I set.

I even tried removing the secret and re-adding it with the new value, no success.

Any idea how to get it to change?

  • 1
    How are you outputting the value in console? It should be masked if it's secret. Can you share your workflow? – frennky Jan 05 '22 at 12:33

1 Answers1

1

You probably forgot to pass the secrets on in the Actions yml Changing this did the trick for me.

Adding them in the yaml file as env passes them on to the workflow

jobs:
  run:
    runs-on: ubuntu-latest
    environment: publish

    steps:
      - uses: actions/checkout@v2
      - name: Set up Python 3.9
        uses: actions/setup-python@v2
        with:
          python-version: 3.9
          cache: 'pip'
      - name: Install dependencies
        run: pip install -r requirements.txt
      - name: Run
        run: python publish.py
        env:
          URL: ${{ secrets.URL }}
          USER: ${{ secrets.USER }}
          PASS: ${{ secrets.PASS }}
skjerns
  • 1,905
  • 1
  • 16
  • 25