Skip to content

Commit

Permalink
Merge branch 'develop' into 'fb-LEAP-1778/has-permission'
Browse files Browse the repository at this point in the history
  • Loading branch information
jombooth committed Jan 28, 2025
2 parents d88a719 + 6a83c74 commit d512141
Show file tree
Hide file tree
Showing 41 changed files with 580 additions and 253 deletions.
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.12.0
uses: docker/build-push-action@v6.13.0
id: docker_build_and_push
with:
context: .
Expand Down
2 changes: 1 addition & 1 deletion .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.12.0
uses: docker/build-push-action@v6.13.0
id: docker_build_and_push
with:
context: .
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.12.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
Loading

0 comments on commit d512141

Please sign in to comment.