Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
mwangggg committed Jul 27, 2023
1 parent 7571eb3 commit 58fd0d1
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 93 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/ci-build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ on:
image-version:
description: the Cryostat application version that will be built
value: ${{ jobs.get-pom-properties.outputs.image-version }}
secrets:
GH_PKGS_READ_TOKEN:
required: true
description: read-only token for pulling artifacts from GitHub Packages

jobs:
get-pom-properties:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/ci-code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ on:
checkout-ref:
required: false
type: string
secrets:
GH_PKGS_READ_TOKEN:
required: true
description: read-only token for pulling artifacts from GitHub Packages

jobs:
spotless:
Expand Down
85 changes: 0 additions & 85 deletions .github/workflows/pr-ci.yml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/pr-command.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: PR Command

concurrency:
group: ci-${{ github.run_id }}
cancel-in-progress: true

on:
issue_comment:
types: [created]

jobs:
create-command:
runs-on: ubuntu-latest
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/build_test') }}
steps:
- name: Command handler for building and testing
id: command
uses: xt0rted/slash-command-action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
command: build_test
reaction: "true"
reaction-type: "+1"
allow-edits: "false"
permission-level: write

code-analysis:
uses: ./.github/workflows/ci-code-analysis.yml
with:
checkout-repo: ${{ github.event.pull_request.head.repo.full_name }}
checkout-ref: ${{ github.event.pull_request.head.ref }}
secrets: inherit
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/build_test')

build-and-test:
strategy:
matrix:
arch: [amd64, arm64]
uses: ./.github/workflows/ci-build-image.yml
with:
build-arch: ${{ matrix.arch }}
checkout-repo: ${{ github.event.pull_request.head.repo.full_name }}
checkout-ref: ${{ github.event.pull_request.head.ref }}
skip-itests: ${{ matrix.arch != 'amd64' }}
secrets: inherit
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/build_test')

push-to-ghcr:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64, arm64]
needs: [code-analysis, build-and-test]
if: always() && github.event.issue.pull_request && startsWith(github.event.comment.body, '/build_test')
steps:
- name: Fail if needs-triage label applied
if: ${{ contains(github.event.pull_request.labels.*.name, 'needs-triage') }}
run: exit 1
- name: Comment test image link
uses: thollander/actions-comment-pull-request@v1
with:
message: |-
${{ github.workflow }}: ${{ ${{ job.status }} === 'success' ? 'succeeded ✅' : 'failed ❌'}}
url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,3 +377,5 @@ but is also intended as an automation or extension point for external clients.
For details about this API see [HTTP_API.md](./docs/HTTP_API.md),
[GRAPHQL.md](./docs/GRAPHQL.md), and
[DISCOVERY_PLUGINS.md](./docs/DISCOVERY_PLUGINS.md).

*delete later*

0 comments on commit 58fd0d1

Please sign in to comment.