Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.github/workflows/ci.yml should skip "cleanup_buckets" job if B2 credentials are not provided #267

Open
mpnowacki-reef opened this issue Jun 16, 2021 · 1 comment

Comments

@mpnowacki-reef
Copy link
Collaborator

Instead of skipping step by step

@mjurbanski-reef
Copy link
Contributor

problem seems to be in the fact if: on job level does not allow secrets in it
i.e.
The workflow is not valid. .github/workflows/ci.yml (Line: 56, Col: 9): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.B2_TEST_APPLICATION_KEY != '' && secrets.B2_TEST_APPLICATION_KEY_ID != ''

The solution most likely will be adding something like this to lint job which is already executed before it:

    outputs:
      has_secrets: ${{ steps.check.outputs.has_secrets }}
    steps:
      - id: secrets_check
        run: |
          if [ -z "${{ secrets.B2_TEST_APPLICATION_KEY }}" ] || [ -z "${{ secrets.B2_TEST_APPLICATION_KEY_ID }}" ]; then
            echo "::set-output name=has_secrets::false"
          else
            echo "::set-output name=has_secrets::true"
          fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants