Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some clarifications #70

Open
l3r8yJ opened this issue Apr 11, 2024 · 1 comment
Open

some clarifications #70

l3r8yJ opened this issue Apr 11, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@l3r8yJ
Copy link
Contributor

l3r8yJ commented Apr 11, 2024

@h1alexbel can you please, explain what's going on in repo from moment of start of GHA and during the whole lifecycle

@h1alexbel h1alexbel added the question Further information is requested label Apr 11, 2024
@h1alexbel h1alexbel self-assigned this Apr 11, 2024
@h1alexbel
Copy link
Contributor

h1alexbel commented Apr 12, 2024

@l3r8yJ sure.

According to core-review.yml:

name: code-review
on:
 pull_request_review:
   types: submitted
permissions:
  pull-requests: write
  contents: read
jobs:
  check:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v4
      - uses: docker://tracehub/code-review-action:latest
        with:
          openai_token: ${{ secrets.OPENAI_TOKEN }}
          github_token: ${{ secrets.GITHUB_TOKEN }}

once pull request review was submitted (approved), GitHub starts the GitHub Action Job according action.yml file.

There, we have runs section:

runs:
using: 'docker'
image: 'Dockerfile'

GHA pulls image from docker://tracehub/code-review-action:latest

you can check our Dockerfile for building this image.

Image pushed to the DockerHub using release.yml that triggered after @rultor release:

[[ "${tag}" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9_]+)?$ ]] || exit -1
mvn versions:set "-DnewVersion=${tag}"
git commit -am "${tag}"
mvn clean install -Prelease

in release profile we prepare JAR with dependencies:

code-review-action/pom.xml

Lines 325 to 356 in 8fd349c

<profile>
<id>release</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>git.tracehub.codereview.action.Entry</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants