Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into fb-dia-1802
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-bernstein committed Jan 29, 2025
2 parents a349ae6 + 751d474 commit 465adc9
Show file tree
Hide file tree
Showing 274 changed files with 3,839 additions and 1,693 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
run: |
set -euo pipefail
version=$(sed "s/^v//g" <<< ${PROVIDED_VERSION})
./toml set '${{ env.PYTHON_VERSION_FILE }}' tool.poetry.version "$version" > pyproject.toml.new
./toml set '${{ env.PYTHON_VERSION_FILE }}' project.version "$version" > pyproject.toml.new
mv -f pyproject.toml.new pyproject.toml
- name: Setup frontend environment
Expand All @@ -98,7 +98,9 @@ jobs:
run: yarn version:libs

- name: "Install poetry"
run: pipx install poetry
env:
POETRY_VERSION: ${{ vars.POETRY_VERSION }}
run: pipx install "poetry==${POETRY_VERSION}"

- name: "Set up Python"
id: setup_python
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-ontop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
${{ steps.calculate-docker-tags.outputs.docker-tags }}
- name: Push Docker image
uses: docker/build-push-action@v6.11.0
uses: docker/build-push-action@v6.13.0
id: docker_build_and_push
with:
context: .
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
type=raw,value=${{ steps.version.outputs.build_version }}
- name: Push Docker image
uses: docker/build-push-action@v6.11.0
uses: docker/build-push-action@v6.13.0
id: docker_build_and_push
with:
context: .
Expand All @@ -143,8 +143,9 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BRANCH_OVERRIDE: ${{ inputs.branch_name }}
VERSION_OVERRIDE: ${{ steps.version.outputs.build_version }}
BRANCH_OVERRIDE=${{ inputs.branch_name }}
VERSION_OVERRIDE=${{ steps.version.outputs.build_version }}
POETRY_VERSION=${{ vars.POETRY_VERSION }}
- name: Create Docker image tag Check
uses: actions/github-script@v7
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-release-promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ jobs:
${{ steps.generate-tags.outputs.ubuntu-tags }}
- name: Build and Push Release Ubuntu Docker image
uses: docker/build-push-action@v6.11.0
uses: docker/build-push-action@v6.13.0
id: docker_build
with:
context: ${{ steps.release_dockerfile.outputs.release_dir }}
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/feature-flags-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ jobs:
steps:
- uses: hmarr/[email protected]

- name: Add Workflow link to chat ops command comment
if: github.event.client_payload.github.payload.comment.id && github.event.client_payload.github.payload.repository.full_name
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GIT_PAT }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
body: |
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
- name: Configure git
shell: bash
run: |
Expand Down Expand Up @@ -68,3 +78,12 @@ jobs:
git status -s
git commit -m '${{ env.FEATURE_FLAGS_COMMIT_MESSAGE }}' -m 'Workflow run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' || true
git push origin HEAD
- name: Add reaction to chat ops command comment
if: always() && github.event.client_payload.github.payload.comment.id && github.event.client_payload.github.payload.repository.full_name
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GIT_PAT }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reactions: ${{ job.status == 'success' && '+1' || '-1' }}
48 changes: 1 addition & 47 deletions .github/workflows/ff-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,14 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.client_payload.github.payload.issue.number }}-${{ github.event.client_payload.slash_command.command }}-${{ github.event.client_payload.slash_command.args.unnamed.arg1 || github.event.client_payload.slash_command.args.all }}

jobs:

update-prepare:
name: "Update: Prepare"
if: github.event.client_payload.slash_command.args.unnamed.arg1 == 'update'
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- name: Update comment
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GIT_PAT }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
body: |
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
update-update-ff:
update-ff:
name: "Update: Update Feature Flags"
if: github.event.client_payload.slash_command.args.unnamed.arg1 == 'update'
needs:
- update-prepare
uses: ./.github/workflows/feature-flags-update.yml
with:
ref: ${{ github.event.client_payload.pull_request.head.ref }}
secrets: inherit

update-update-comment:
name: "Update: Update Comment"
if: always()
needs:
- update-update-ff
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- name: Get details
id: details
shell: bash
env:
PR_HEAD: ${{ github.event.client_payload.pull_request.head.ref }}
run: |
reaction='-1'
if [[ '${{ needs.update-update-ff.result }}' == 'success' ]]; then
reaction='+1'
fi
echo "reaction=${reaction}" >> $GITHUB_OUTPUT
- name: Update comment
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GIT_PAT }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reactions: ${{ steps.details.outputs.reaction }}

help:
if: ${{ github.event.client_payload.slash_command.args.unnamed.arg1 == 'help' || !contains(fromJson('["update"]'), github.event.client_payload.slash_command.args.unnamed.arg1) }}
runs-on: ubuntu-latest
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/fm-command.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "/fm command"

on:
repository_dispatch:
types: [ fm-command ]

concurrency:
group: ${{ github.workflow }}-${{ github.event.client_payload.github.payload.issue.number }}-${{ github.event.client_payload.slash_command.command }}-${{ github.event.client_payload.slash_command.args.unnamed.arg1 || github.event.client_payload.slash_command.args.all }}

jobs:
sync:
name: "Update: Update Feature Flags"
if: github.event.client_payload.slash_command.args.unnamed.arg1 == 'sync'
uses: ./.github/workflows/follow-merge-upstream-repo-sync-v2.yml
with:
branch_name: ${{ github.event.client_payload.pull_request.head.ref }}
secrets: inherit

help:
if: ${{ github.event.client_payload.slash_command.args.unnamed.arg1 == 'help' || !contains(fromJson('["sync"]'), github.event.client_payload.slash_command.args.unnamed.arg1) }}
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- name: Update comment
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.GIT_PAT }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
body: |
> Command | Description
> --- | ---
> /fm sync | Sync upstream prs and merge with pull request base
reaction-type: hooray
27 changes: 16 additions & 11 deletions .github/workflows/follow-merge-sync-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,20 @@ jobs:
});
throw `${{ github.actor }} don't have membership in ${owner} organization`
- name: Checkout Actions Hub
uses: actions/checkout@v4
with:
token: ${{ secrets.GIT_PAT }}
repository: HumanSignal/actions-hub
path: ./.github/actions-hub

- name: Dispatch Follow Merge Event
uses: ./.github/actions-hub/actions/follow-merge-dispatch
- name: Dispatch Follow Merge Workflow
uses: actions/github-script@v7
env:
BRANCH_NAME: ${{ github.head_ref }}
with:
github_token: ${{ secrets.GIT_PAT }}
downstream_repository: "${{ env.DOWNSTREAM_REPOSITORY }}"
github-token: ${{ secrets.GIT_PAT }}
script: |
const branch_name = process.env.BRANCH_NAME;
github.rest.actions.createWorkflowDispatch({
owner: "HumanSignal",
repo: "label-studio-enterprise",
workflow_id: "follow-merge-upstream-repo-sync-v2.yml",
ref: "develop",
inputs: {
branch_name: branch_name,
}
});
Loading

0 comments on commit 465adc9

Please sign in to comment.