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

Use the reusable workflow as a template #86

Merged
merged 1 commit into from
Jun 14, 2022
Merged

Conversation

jetersen
Copy link
Member

@jetersen jetersen commented Jun 13, 2022

This greatly simplifies cd workflow for the end user 😅

Tested in jenkinsci/jenkins-infra-test-plugin@49b5815

cc @jglick @timja

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@jetersen
Copy link
Member Author

@NotMyFault maybe you want to move the crowdin template to a reusable workflow? 👏

Feel free to open a PR over at https://github.com/jenkins-infra/github-reusable-workflows

Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So much nicer.

No need to pass GITHUB_TOKEN?

@jetersen
Copy link
Member Author

jetersen commented Jun 13, 2022

No need to pass GITHUB_TOKEN?

Indeed, there is no need as GitHub token is passed automagically :)

When a reusable workflow is triggered by a caller workflow, the github context is always associated with the caller workflow. The called workflow is automatically granted access to github.token and secrets.GITHUB_TOKEN. For more information about the github context, see "Context and expression syntax for GitHub Actions."
https://docs.github.com/en/actions/using-workflows/reusing-workflows

Check the test plugin 😉

https://github.com/jenkinsci/jenkins-infra-test-plugin/blob/master/.github/workflows/cd.yml

also tested on a real plugin:
https://github.com/jenkinsci/gitlab-api-plugin/blob/44f46b54c775de82a2641b205cc8fc8c233f26ed/.github/workflows/cd.yml
https://github.com/jenkinsci/gitlab-api-plugin/runs/6870775522?check_suite_focus=true

@timja timja changed the title use the reusable workflow as a template Use the reusable workflow as a template Jun 14, 2022
@timja timja merged commit d65bdd8 into jenkinsci:master Jun 14, 2022
@jetersen jetersen deleted the patch-1 branch June 14, 2022 06:35
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.

3 participants