diff --git a/.github/workflows/issue_comment.yml b/.github/workflows/issue_comment.yml deleted file mode 100644 index 8ee824b..0000000 --- a/.github/workflows/issue_comment.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Sync issue comments to JIRA - -# This workflow will be triggered when new issue comment is created (including PR comments) -on: issue_comment - -jobs: - sync_issue_comments_to_jira: - name: Sync Issue Comments to Jira - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: Sync issue comments to JIRA - uses: espressif/github-actions/sync_issues_to_jira@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - JIRA_PASS: ${{ secrets.JIRA_PASS }} - JIRA_PROJECT: RDT - JIRA_COMPONENT: idf-build-apps - JIRA_URL: ${{ secrets.JIRA_URL }} - JIRA_USER: ${{ secrets.JIRA_USER }} diff --git a/.github/workflows/new_issues.yml b/.github/workflows/new_issues.yml deleted file mode 100644 index aa5d226..0000000 --- a/.github/workflows/new_issues.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Sync issues to Jira - -# This workflow will be triggered when a new issue is opened -on: issues - -jobs: - sync_issues_to_jira: - name: Sync issues to Jira - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: Sync GitHub issues to Jira project - uses: espressif/github-actions/sync_issues_to_jira@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - JIRA_PASS: ${{ secrets.JIRA_PASS }} - JIRA_PROJECT: RDT - JIRA_COMPONENT: idf-build-apps - JIRA_URL: ${{ secrets.JIRA_URL }} - JIRA_USER: ${{ secrets.JIRA_USER }} diff --git a/.github/workflows/new_prs.yml b/.github/workflows/new_prs.yml deleted file mode 100644 index a8a6667..0000000 --- a/.github/workflows/new_prs.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Sync remain PRs to Jira - -# This workflow will be triggered every hour, to sync remaining PRs (i.e. PRs with zero comment) to Jira project -# Note that, PRs can also get synced when new PR comment is created -on: - schedule: - - cron: "0 * * * *" - -jobs: - sync_prs_to_jira: - name: Sync PRs to Jira - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: Sync PRs to Jira project - uses: espressif/github-actions/sync_issues_to_jira@master - with: - cron_job: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - JIRA_PASS: ${{ secrets.JIRA_PASS }} - JIRA_PROJECT: RDT - JIRA_COMPONENT: idf-build-apps - JIRA_URL: ${{ secrets.JIRA_URL }} - JIRA_USER: ${{ secrets.JIRA_USER }} diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index eb02481..ef3cb97 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -3,16 +3,16 @@ name: Publish PyPI on: push: tags: - - 'v*' + - "v*" jobs: deploy: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: '3.7' + python-version: "3.7" - name: Publish packages env: FLIT_USERNAME: __token__ diff --git a/.github/workflows/sync-jira.yml b/.github/workflows/sync-jira.yml new file mode 100644 index 0000000..e5fd55f --- /dev/null +++ b/.github/workflows/sync-jira.yml @@ -0,0 +1,61 @@ +# FILE: .github/workflows/sync-jira.yml +--- +# This GitHub Actions workflow synchronizes GitHub issues, comments, and pull requests with Jira. +# It triggers on new issues, issue comments, and on a scheduled basis. +# The workflow uses a custom action to perform the synchronization with Jira (espressif/sync-jira-actions). + +name: 🔷 Sync to Jira + +run-name: > + Sync to Jira - + ${{ github.event_name == 'issue_comment' && 'Issue Comment' || + github.event_name == 'schedule' && 'New Pull Requests' || + github.event_name == 'issues' && 'New Issue' || + github.event_name == 'workflow_dispatch' && 'Manual Sync' }} + +on: + issues: { types: [opened] } + issue_comment: { types: [created, edited, deleted] } + schedule: [cron: "0 * * * *"] + workflow_dispatch: + inputs: + action: + { + description: "Action to be performed", + required: true, + default: "mirror-issues", + } + issue-numbers: + { + description: "Issue numbers to sync (comma-separated)", + required: true, + } + +jobs: + sync-to-jira: + name: > + Sync to Jira - + ${{ github.event_name == 'issue_comment' && 'Issue Comment' || + github.event_name == 'schedule' && 'New Pull Requests' || + github.event_name == 'issues' && 'New Issue' || + github.event_name == 'workflow_dispatch' && 'Manual Sync' }} + runs-on: ubuntu-latest + permissions: + contents: read + issues: write + pull-requests: write + steps: + - name: Check out + uses: actions/checkout@v4 + + - name: Run synchronization to Jira + uses: espressif/sync-jira-actions@v1 + with: + cron_job: ${{ github.event_name == 'schedule' && 'true' || '' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JIRA_PASS: ${{ secrets.JIRA_PASS }} + JIRA_PROJECT: RDT + JIRA_COMPONENT: idf-build-apps + JIRA_URL: ${{ secrets.JIRA_URL }} + JIRA_USER: ${{ secrets.JIRA_USER }} diff --git a/.github/workflows/test-build-docs.yml b/.github/workflows/test-build-docs.yml index 0b81fa9..526dc8a 100644 --- a/.github/workflows/test-build-docs.yml +++ b/.github/workflows/test-build-docs.yml @@ -5,7 +5,7 @@ on: jobs: build-docs: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - name: Set up Python diff --git a/.github/workflows/test-build-idf-apps.yml b/.github/workflows/test-build-idf-apps.yml index 35e60f5..6f15c4b 100644 --- a/.github/workflows/test-build-idf-apps.yml +++ b/.github/workflows/test-build-idf-apps.yml @@ -17,7 +17,7 @@ defaults: jobs: build-python-packages: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5