Upgraded the patch-odoo-ticket action to version v1.3 and added support for an authentication token to secure communication with the FastAPI server. Modified the workflow, main logic, and action definition to handle the auth_token input and ensure proper authorization. Includes error handling for missing or invalid tokens.
27 lines
763 B
YAML
27 lines
763 B
YAML
name: 'patch-odoo-ticket'
|
|
description: 'Update an Odoo ticket via FastAPI when a Gitea Issue changes.'
|
|
|
|
author: 'Mandresy RABENJAHARISON <mandresy.rabenjaharison@gmail.com>'
|
|
branding:
|
|
icon: send
|
|
color: blue
|
|
|
|
inputs:
|
|
base_url:
|
|
description: 'Base URL of the FastAPI server.'
|
|
required: true
|
|
auth_token:
|
|
description: 'Bearer token for authenticating to the FastAPI server.'
|
|
required: true
|
|
|
|
runs:
|
|
using: 'docker'
|
|
image: 'Dockerfile'
|
|
env:
|
|
BASE_URL: ${{ inputs.base_url }}
|
|
AUTH_TOKEN: ${{ inputs.auth_token }}
|
|
BRANCH_REF: ${{ gitea.event.issue.ref }}
|
|
ISSUE_STATE: ${{ gitea.event.issue.state }}
|
|
ISSUE_ASSIGNEES: ${{ join(gitea.event.issue.assignees.*.login, ',') }}
|
|
ISSUE_DUE_DATE: ${{ gitea.event.issue.due_date }}
|