diff --git a/.github/workflows/comment.yaml b/.github/workflows/comment.yaml index e48a80a0..afa68835 100644 --- a/.github/workflows/comment.yaml +++ b/.github/workflows/comment.yaml @@ -15,9 +15,14 @@ name: Comment on: push: branches: - - '*' + - 'main' + paths: + - 'graal/**' tags: - '' + pull_request: + paths: + - 'graal/**' jobs: test: runs-on: ubuntu-latest diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e2303d33..6794f46f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -19,6 +19,15 @@ on: jobs: release: runs-on: ubuntu-latest + strategy: + matrix: + include: + - context: ./cmd/shauser + file: ./cmd/shauser/Dockerfile + tag: shauser + - context: ./sharp/content + file: ./sharp/content/Dockerfile + tag: content steps: - uses: actions/checkout@v3 - name: Login to DockerHub @@ -29,7 +38,33 @@ jobs: - name: Build and push uses: docker/build-push-action@v5 with: - context: ./cmd/shauser - file: ./cmd/shauser/Dockerfile + context: ${{ matrix.context }} + file: ${{ matrix.file }} push: true - tags: ${{ secrets.DOCKERHUB_USERNAME || 'app' }}/shauser:${{ github.ref_name }} + tags: ${{ secrets.DOCKERHUB_USERNAME || 'app' }}/${{ matrix.tag }}:${{ github.ref_name }} + graal: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./graal + if: github.ref == 'refs/heads/main' + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: graalvm/setup-graalvm@v1 + with: + java-version: '21' + distribution: 'graalvm' # See 'Options' for all available distributions + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Native Image Build + run: mvn -Pnative spring-boot:build-image -DskipTests + + - uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Push to Docker Hub + run: | + docker tag sharing-comment:0.0.1-SNAPSHOT ${{ secrets.DOCKERHUB_USERNAME }}/sharing-comment:${{ github.ref_name }} + docker push ${{ secrets.DOCKERHUB_USERNAME }}/sharing-comment:${{ github.ref_name }} \ No newline at end of file diff --git a/readme.md b/readme.md index c80451f1..6a178e20 100644 --- a/readme.md +++ b/readme.md @@ -7,10 +7,11 @@ Sharing Has An Relly Interesting Name [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fsixwaaaay%2Fsharing.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fsixwaaaay%2Fsharing?ref=badge_shield) [![Apache 2.0](https://img.shields.io/github/license/sixwaaaay/sharing)](https://github.com/sixwaaaay/sharing/blob/main/LICENSE) -| name | CI | coverage | size | version | -|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------| -| users | [![CI](https://github.com/sixwaaaay/sharing/actions/workflows/users.yaml/badge.svg)](https://github.com/sixwaaaay/sharing/actions/workflows/users.yaml) | [![codecov](https://codecov.io/gh/sixwaaaay/sharing/branch/main/graph/badge.svg?flag=users)](https://codecov.io/gh/sixwaaaay/sharing) | [![Container Image Size](https://img.shields.io/docker/image-size/sixwaaaay/shauser?sort=semver)](https://hub.docker.com/r/sixwaaaay/shauser) | [![Docker Image Version (latest semver)](https://img.shields.io/docker/v/sixwaaaay/shauser?sort=semver)](https://hub.docker.com/r/sixwaaaay/shauser) | -| content | [![CI](https://github.com/sixwaaaay/sharing/actions/workflows/content.yaml/badge.svg)](https://github.com/sixwaaaaay/sharing/actions/workflows/content.yaml) | [![codecov](https://codecov.io/gh/sixwaaaay/sharing/branch/main/graph/badge.svg?flag=content)](https://codecov.io/gh/sixwaaaay/sharing) | [![Container Image Size](https://img.shields.io/docker/image-size/sixwaaaay/content?sort=semver)](https://hub.docker.com/r/sixwaaaay/content) | [![Docker Image Version (latest semver)](https://img.shields.io/docker/v/sixwaaaay/content?sort=semver)](https://hub.docker.com/r/sixwaaaay/content) | +| name | CI | coverage | size | version | +|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| users | [![CI](https://github.com/sixwaaaay/sharing/actions/workflows/users.yaml/badge.svg)](https://github.com/sixwaaaay/sharing/actions/workflows/users.yaml) | [![codecov](https://codecov.io/gh/sixwaaaay/sharing/branch/main/graph/badge.svg?flag=users)](https://codecov.io/gh/sixwaaaay/sharing) | [![Container Image Size](https://img.shields.io/docker/image-size/sixwaaaay/shauser?sort=semver)](https://hub.docker.com/r/sixwaaaay/shauser) | [![Docker Image Version (latest semver)](https://img.shields.io/docker/v/sixwaaaay/shauser?sort=semver)](https://hub.docker.com/r/sixwaaaay/shauser) | +| content | [![CI](https://github.com/sixwaaaay/sharing/actions/workflows/content.yaml/badge.svg)](https://github.com/sixwaaaaay/sharing/actions/workflows/content.yaml) | [![codecov](https://codecov.io/gh/sixwaaaay/sharing/branch/main/graph/badge.svg?flag=content)](https://codecov.io/gh/sixwaaaay/sharing) | [![Container Image Size](https://img.shields.io/docker/image-size/sixwaaaay/content?sort=semver)](https://hub.docker.com/r/sixwaaaay/content) | [![Docker Image Version (latest semver)](https://img.shields.io/docker/v/sixwaaaay/content?sort=semver)](https://hub.docker.com/r/sixwaaaay/content) | +| comment | [![CI](https://github.com/sixwaaaay/sharing/actions/workflows/comment.yaml/badge.svg)](https://github.com/sixwaaaaay/sharing/actions/workflows/comment.yaml) | [![codecov](https://codecov.io/gh/sixwaaaay/sharing/branch/main/graph/badge.svg?flag=comments)](https://codecov.io/gh/sixwaaaay/sharing) | [![Container Image Size](https://img.shields.io/docker/image-size/sixwaaaay/sharing-comment?sort=semver)](https://hub.docker.com/r/sixwaaaay/sharing-comment) | [![Docker Image Version (latest semver)](https://img.shields.io/docker/v/sixwaaaay/sharing-comment?sort=semver)](https://hub.docker.com/r/sixwaaaay/sharing-comment) | ## License