From 1b2a980a4703580966f427eb8a38d66241db6774 Mon Sep 17 00:00:00 2001 From: jmug Date: Mon, 23 Feb 2026 00:52:15 -0800 Subject: [PATCH] [chore] Workflow cleanup. --- .github/workflows/docker.yml | 55 +++++++++++---------- .github/workflows/triage_issue.yml | 54 -------------------- .github/workflows/triage_pr.yml | 79 ------------------------------ 3 files changed, 28 insertions(+), 160 deletions(-) delete mode 100644 .github/workflows/triage_issue.yml delete mode 100644 .github/workflows/triage_pr.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 590b7b52..9682bbdc 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,36 +3,38 @@ name: Docker on: push: branches: - - "master" + - "handmade" tags: - "*" - paths-ignore: - - ".github/**" - - "!.github/workflows/docker.yml" - - "!.github/workflows/preview_*.yml" - - ".vscode/**" - - ".gitignore" - - ".gitlab-ci.yml" - - "LICENSE" - - "README" + # TODO: Bring back once gitea is updated past 1.21 + # paths-ignore: + # - ".github/**" + # - "!.github/workflows/docker.yml" + # - ".vscode/**" + # - ".gitignore" + # - ".gitlab-ci.yml" + # - "LICENSE" + # - "README" pull_request: branches: - - "master" - paths-ignore: - - ".github/**" - - "!.github/workflows/docker.yml" - - "!.github/workflows/preview_*.yml" - - ".vscode/**" - - ".gitignore" - - ".gitlab-ci.yml" - - "LICENSE" - - "README" + - "handmade" + # TODO: Bring back once gitea is updated past 1.21 + # paths-ignore: + # - ".github/**" + # - "!.github/workflows/docker.yml" + # - "!.github/workflows/preview_*.yml" + # - ".vscode/**" + # - ".gitignore" + # - ".gitlab-ci.yml" + # - "LICENSE" + # - "README" workflow_dispatch: jobs: publish: runs-on: ubuntu-latest - if: github.event_name != 'pull_request' + # NOTE: Running on pull requests for now, but without pushing. + # if: github.event_name != 'pull_request' steps: - name: Checkout uses: actions/checkout@v4 @@ -46,16 +48,15 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ghcr.io/AYM1607/revoltchat-client + images: handmadecities/handmade-revolt-web-client env: DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index - - name: Login to Github Container Registry - uses: docker/login-action@v3 + - name: Login to DockerHub + uses: docker/login-action@v1 if: github.event_name != 'pull_request' with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GCR_TOKEN }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and publish uses: docker/build-push-action@v6 with: diff --git a/.github/workflows/triage_issue.yml b/.github/workflows/triage_issue.yml deleted file mode 100644 index ecc69f59..00000000 --- a/.github/workflows/triage_issue.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Add Issue to Board - -on: - issues: - types: [opened] - -jobs: - track_issue: - runs-on: ubuntu-latest - steps: - - name: Get project data - env: - GITHUB_TOKEN: ${{ secrets.PAT }} - run: | - gh api graphql -f query=' - query { - organization(login: "revoltchat"){ - projectV2(number: 3) { - id - fields(first:20) { - nodes { - ... on ProjectV2SingleSelectField { - id - name - options { - id - name - } - } - } - } - } - } - }' > project_data.json - - echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV - echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV - echo 'TODO_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV - - - name: Add issue to project - env: - GITHUB_TOKEN: ${{ secrets.PAT }} - ISSUE_ID: ${{ github.event.issue.node_id }} - run: | - item_id="$( gh api graphql -f query=' - mutation($project:ID!, $issue:ID!) { - addProjectV2ItemById(input: {projectId: $project, contentId: $issue}) { - item { - id - } - } - }' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectV2ItemById.item.id')" - - echo 'ITEM_ID='$item_id >> $GITHUB_ENV diff --git a/.github/workflows/triage_pr.yml b/.github/workflows/triage_pr.yml deleted file mode 100644 index 3010d2e5..00000000 --- a/.github/workflows/triage_pr.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: Add PR to Board - -on: - pull_request_target: - types: [opened, synchronize, ready_for_review, review_requested] - -jobs: - track_pr: - runs-on: ubuntu-latest - steps: - - name: Get project data - env: - GITHUB_TOKEN: ${{ secrets.PAT }} - run: | - gh api graphql -f query=' - query { - organization(login: "revoltchat"){ - projectV2(number: 5) { - id - fields(first:20) { - nodes { - ... on ProjectV2SingleSelectField { - id - name - options { - id - name - } - } - } - } - } - } - }' > project_data.json - - echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV - echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV - echo 'INCOMING_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="🆕 Untriaged") |.id' project_data.json) >> $GITHUB_ENV - - - name: Add PR to project - env: - GITHUB_TOKEN: ${{ secrets.PAT }} - PR_ID: ${{ github.event.pull_request.node_id }} - run: | - item_id="$( gh api graphql -f query=' - mutation($project:ID!, $pr:ID!) { - addProjectV2ItemById(input: {projectId: $project, contentId: $pr}) { - item { - id - } - } - }' -f project=$PROJECT_ID -f pr=$PR_ID --jq '.data.addProjectV2ItemById.item.id')" - - echo 'ITEM_ID='$item_id >> $GITHUB_ENV - - - name: Set fields - env: - GITHUB_TOKEN: ${{ secrets.PAT }} - run: | - gh api graphql -f query=' - mutation ( - $project: ID! - $item: ID! - $status_field: ID! - $status_value: String! - ) { - set_status: updateProjectV2ItemFieldValue(input: { - projectId: $project - itemId: $item - fieldId: $status_field - value: { - singleSelectOptionId: $status_value - } - }) { - projectV2Item { - id - } - } - }' -f project=$PROJECT_ID -f item=$ITEM_ID -f status_field=$STATUS_FIELD_ID -f status_value=${{ env.INCOMING_OPTION_ID }} --silent