diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 590b7b52..5ad5f2b6 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -4,12 +4,12 @@ on: push: branches: - "master" + - "handmade" tags: - "*" paths-ignore: - ".github/**" - "!.github/workflows/docker.yml" - - "!.github/workflows/preview_*.yml" - ".vscode/**" - ".gitignore" - ".gitlab-ci.yml" @@ -18,6 +18,7 @@ on: pull_request: branches: - "master" + - "handmade" paths-ignore: - ".github/**" - "!.github/workflows/docker.yml" @@ -32,7 +33,7 @@ on: jobs: publish: runs-on: ubuntu-latest - if: github.event_name != 'pull_request' + # if: github.event_name != 'pull_request' steps: - name: Checkout uses: actions/checkout@v4 @@ -49,18 +50,11 @@ jobs: images: ghcr.io/AYM1607/revoltchat-client env: DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index - - name: Login to Github Container Registry - uses: docker/login-action@v3 - if: github.event_name != 'pull_request' - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GCR_TOKEN }} - name: Build and publish uses: docker/build-push-action@v6 with: context: . - push: ${{ github.event_name != 'pull_request' }} + push: false # ${{ github.event_name != 'pull_request' }} platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} annotations: ${{ steps.meta.outputs.annotations }} 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