Contentful Update #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
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 |