-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (35 loc) · 1.17 KB
/
contentful_update.yml
File metadata and controls
40 lines (35 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Contentful Update
on:
workflow_dispatch:
inputs:
content_type_id:
description: 'Contentful content type ID'
required: true
fields_to_update:
description: 'Fields to update as JSON string'
required: true
update_conditions:
description: 'Conditions to select entries for update as JSON string'
required: false
jobs:
update_contentful:
runs-on: ubuntu-latest
if: false # 这将导致整个job被跳过
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install contentful_management
- name: Run script
env:
CONTENTFUL_ACCESS_TOKEN: ${{ secrets.CONTENTFUL_EXPORT_TOKEN }}
CONTENT_TYPE_ID: ${{ github.event.inputs.content_type_id }}
FIELDS_TO_UPDATE: ${{ github.event.inputs.fields_to_update }}
UPDATE_CONDITIONS: ${{ github.event.inputs.update_conditions }}
run: python contentful/update_contentful.py