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

[1.x] feat: support passing of composer_auth to the reusable workflows and environment #3960

Closed
wants to merge 2 commits into from

Conversation

imorland
Copy link
Member

Related to [X} which adds the same for the 2.x branch

Sometimes it is necessary to use private packagist, extiverse or such to retrieve composer packages for use in CI/CD tests. This PR allows setting of the COMPOSER_AUTH environment variable from an extension's workflow file.

For example:

name: Extension PHP

on: [workflow_dispatch, push, pull_request]

jobs:
  run:
    uses: flarum/framework/.github/workflows/[email protected]
    with:
      enable_backend_testing: true
      enable_phpstan: true
      php_versions: '["8.1", "8.2", "8.3"]'

      backend_directory: .

    secrets:
      composer_auth: '{"bearer":{"extiverse.com": "${{secrets.EXTIVERSE_COMPOSER_TOKEN}}"}}'

This allows us to pass the Bearer JSON array, and therefore covers cases where multiple secrets are required. Extiverse example shown.

@imorland imorland requested a review from a team as a code owner January 19, 2024 16:19
@imorland
Copy link
Member Author

Closing as direct pushing to 1.x

@imorland imorland closed this Jan 19, 2024
@imorland imorland deleted the im/composer-auth branch January 19, 2024 16:28
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

Successfully merging this pull request may close these issues.

2 participants