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

ci: Add sample CD workflow #1

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/assign-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ jobs:
name: Add to project
uses: actions/[email protected]
with:
project-url: https://github.com/orgs/hedia-team/projects/${{inputs.project-id}}
project-url: https://github.com/orgs/hedia-team/projects/${{inputs.project-id || 2}}
github-token: ${{ secrets.ASSIGN_TO_PROJECT_TOKEN }}

- if: github.event_name == 'pull_request'
name: Set status
uses: hedia-team/[email protected]
with:
project-url: https://github.com/orgs/hedia-team/projects/${{inputs.project-id}}
project-url: https://github.com/orgs/hedia-team/projects/${{inputs.project-id || 2}}
github-token: ${{ secrets.ASSIGN_TO_PROJECT_TOKEN }}
item-id: ${{ steps.addItem.outputs.itemId }}
field-keys: Status
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release, Publish, Deploy

on:
workflow_call:
inputs:
semver:
description: Semver version format expected. If set, a release will be created on Github.
required: false
type: string
type:
description: If set to "module", the code will be published to npm. If set to "service", the code will be deployed to Scalingo.
required: true
type: string

secrets:
NPM_TOKEN:
description: Needed to publish a package to npm
required: true
SCALINGO_TOKEN:
description: Needed to deploy to Scalingo
required: true

jobs:
build-test:
runs-on: ubuntu-latest

steps:
- name: Release on Github
run: echo ${{ inputs.semver }}

- name: Publish on NPM
if: inputs.type == 'module'
run: echo ${{ inputs.type }}

- name: Deploy on Scalingo
if: inputs.type == 'service'
run: echo ${{ inputs.type }}