This action defines the same rich environment variables as Codeship Pro in your GitHub Workflow.
The action enables running existing Codeship scripts that reference variables like CI_COMMIT_MESSAGE, without having to refactor them to GitHub Workflows Syntax. Using this action, you can share scripts across your GitHub Workflow and Codeship builds, getting the best of both worlds 🎉.
(Optional) A github token is required to populate the CI_COMMIT_MESSAGE for workflows triggered by a pull_request event
(Optional) If provided project-id will be used to populate CI_PROJECT_ID in the github environment
name: Where are my env var?
steps:
- uses: twistedpair/codeship-env-adapter@v1
with:
# Provide github-token if you need to populate commit messages for pull_request event triggers
github-token: ${{ secrets.GITHUB_TOKEN }}
# provide your project id, if you fancy
project-id: '123abc-project-id'
- name: Playback some env vars
run: echo "Hi, I'm build $CI_COMMIT_ID"CI- will betrueCI_BRANCH- current ref branchCI_BUILD_APPROVED- will befalseCI_BUILD_ID- usesGitHub build idper job UUIDCI_COMMITTER_EMAILCI_COMMITTER_USERNAMECI_COMMIT_DESCRIPTION- unimplemented (blank)CI_COMMIT_ID- e.g.5fd8d0bfbbfa4efcdc663440da1b2e37a86a306aCI_COMMIT_MESSAGECI_NAME- will begithubCI_PROJECT_ID- only set if provided asproject-idin ActionwithconfigCI_PR_NUMBER- repo specific pull request number (pull_request events only)CI_PULL_REQUEST- github url of the pull request associated with the triggered event (pull_request events only)CI_REPO_NAME- repo short name (not the full name) e.g.my-repoCI_STRING_TIME- e.g.2020-02-09T22:33:55ZCI_TIMESTAMP- e.g.1581287635
If you would like to help define additional behaviors, please submit a PR.
This action will NOT run codeship-steps.yml or codeship-services.yml files in GitHub Workflows.
If you want to run step files, run your builds in Codeship.
This action is not endorsed or reviewed by Codeship. Use at your own risk. The author is not employed by either GitHub or Codeship.
- "Codeship" and "Codeship Pro" are legal marks of CloudBees, Inc.
- "GitHub" and "GitHub Workflows" are the legal marks of GitHub, Inc.