Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

chore: rewrite the existing mechanism #20

Merged
merged 1 commit into from Feb 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/main.yml
@@ -0,0 +1,33 @@
name: Contentful Migration Example

on:
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- "**"

jobs:
build:

runs-on: ubuntu-latest
name: Contentful Migration Example
steps:
- name: Check out code into the directory
uses: actions/checkout@v1

- name: Contentful Migration
id: migrate
uses: ./
with:
delete_after_merge: true
env: # Set the secret as an input
SPACE_ID: ${{ secrets.SPACE_ID }}
MANAGEMENT_API_KEY: ${{ secrets.MANAGEMENT_API_KEY }}

- name: Create commit comment
uses: peter-evans/commit-comment@v1
with:
body: |
See changes to the [${{steps.migrate.outputs.environment_name }} ][1] Environment on Contentful.

[1]: ${{steps.migrate.outputs.environment_url}}
15 changes: 0 additions & 15 deletions .github/workflows/test.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -64,3 +64,6 @@ typings/

# next.js build output
.next

# IDE
.idea
Empty file added .gitkeep
Empty file.
3 changes: 3 additions & 0 deletions action.yml
@@ -1,5 +1,8 @@
name: 'Contentful Migrations Action'
description: 'Run a Migration against your Contentful space'
inputs:
delete_after_merge:
description: 'Should the head branch be deleted after it was merged? (true|false)'
outputs:
environment_url:
description: 'Contentful environment URL'
Expand Down
5 changes: 5 additions & 0 deletions dist/index.d.ts
@@ -0,0 +1,5 @@
import { Environment } from "contentful-management/dist/typings/entities/environment";
export interface EnvironmentProps {
environmentId: string;
environment: Environment;
}