diff --git a/.github/workflows/merge-publish.yml b/.github/workflows/merge-publish.yml index 8ef00033..1fc51ef7 100644 --- a/.github/workflows/merge-publish.yml +++ b/.github/workflows/merge-publish.yml @@ -21,7 +21,6 @@ jobs: uses: hypertrace/actions/checksum@main - name: Cache packages - id: cache-packages uses: actions/cache@v2 with: path: ~/.gradle @@ -37,7 +36,9 @@ jobs: password: ${{ secrets.DOCKERHUB_READ_TOKEN }} - name: push docker image - run: ./gradlew dockerPushImages + uses: hypertrace/github-actions/gradle@main + with: + args: dockerPushImages env: DOCKER_USERNAME: ${{ secrets.DOCKERHUB_PUBLISH_USER }} DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_PUBLISH_TOKEN }} diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index 217fad90..b831c010 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -20,10 +20,9 @@ jobs: fetch-depth: 0 - name: create checksum file - uses: hypertrace/actions/checksum@main + uses: hypertrace/github-actions/checksum@main - name: Cache packages - id: cache-packages uses: actions/cache@v2 with: path: ~/.gradle @@ -39,16 +38,12 @@ jobs: password: ${{ secrets.DOCKERHUB_READ_TOKEN }} - name: Build with Gradle - run: ./gradlew build dockerBuildImages + uses: hypertrace/github-actions/gradle@main + with: + args: build dockerBuildImages validate-helm-charts: runs-on: ubuntu-20.04 - container: - image: hypertrace/helm-gcs-packager:0.3.1 - credentials: - username: ${{ secrets.DOCKERHUB_READ_USER }} - password: ${{ secrets.DOCKERHUB_READ_TOKEN }} - # Set fetch-depth: 0 to fetch commit history and tags for use in version calculation steps: - name: Check out code uses: actions/checkout@v2.3.4 @@ -58,7 +53,7 @@ jobs: fetch-depth: 0 - name: validate charts - uses: hypertrace/actions/validate-charts@main + uses: hypertrace/github-actions/validate-charts@main snyk-scan: runs-on: ubuntu-20.04 diff --git a/.github/workflows/pr-test.yml b/.github/workflows/pr-test.yml index d3d790d3..4e2bb426 100644 --- a/.github/workflows/pr-test.yml +++ b/.github/workflows/pr-test.yml @@ -16,7 +16,7 @@ jobs: fetch-depth: 0 - name: create checksum file - uses: hypertrace/actions/checksum@main + uses: hypertrace/github-actions/checksum@main - name: Cache packages id: cache-packages @@ -29,7 +29,9 @@ jobs: gradle-packages-${{ runner.os }} - name: Unit test - run: ./gradlew jacocoTestReport + uses: hypertrace/github-actions/gradle@main + with: + args: jacocoTestReport - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 @@ -38,22 +40,27 @@ jobs: fail_ci_if_error: true flags: unit - - name: Integration test - run: ./gradlew jacocoIntegrationTestReport - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 - with: - name: integration test reports - fail_ci_if_error: true - flags: integration + - name: Integration test + uses: hypertrace/github-actions/gradle@main + with: + args: jacocoIntegrationTestReport - - name: Copy test reports - run: ./gradlew copyAllReports --output-dir=/tmp/test-reports + - name: copy test reports + uses: hypertrace/github-actions/gradle@main + with: + args: copyAllReports --output-dir=/tmp/test-reports - name: Archive test reports uses: actions/upload-artifact@v1 with: name: test-reports path: /tmp/test-reports - if: ${{ always() }} + if: always() + + - name: Publish Unit Test Results + uses: docker://ghcr.io/enricomi/publish-unit-test-result-action:v1.6 + if: always() + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + files: ./**/build/test-results/**/*.xml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c00470e1..0c247297 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,10 +17,9 @@ jobs: fetch-depth: 0 - name: create checksum file - uses: hypertrace/actions/checksum@main + uses: hypertrace/github-actions/checksum@main - name: Cache packages - id: cache-packages uses: actions/cache@v2 with: path: ~/.gradle @@ -36,7 +35,9 @@ jobs: password: ${{ secrets.DOCKERHUB_READ_TOKEN }} - name: publish docker image - run: ./gradlew publish dockerPushImages + uses: hypertrace/github-actions/gradle@main + with: + args: publish dockerPushImages env: DOCKER_USERNAME: ${{ secrets.DOCKERHUB_PUBLISH_USER }} DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_PUBLISH_TOKEN }} @@ -46,11 +47,6 @@ jobs: publish-helm-charts: needs: publish-artifacts runs-on: ubuntu-20.04 - container: - image: hypertrace/helm-gcs-packager:0.3.1 - credentials: - username: ${{ secrets.DOCKERHUB_READ_USER }} - password: ${{ secrets.DOCKERHUB_READ_TOKEN }} steps: # Set fetch-depth: 0 to fetch commit history and tags for use in version calculation - name: Checkout Repository @@ -59,7 +55,8 @@ jobs: fetch-depth: 0 - name: package and release charts - env: - HELM_GCS_CREDENTIALS: ${{ secrets.HELM_GCS_CREDENTIALS }} - HELM_GCS_REPOSITORY: ${{ secrets.HELM_GCS_REPOSITORY }} - uses: hypertrace/actions/helm-gcs-publish@main + uses: hypertrace/github-actions/helm-gcs-publish@main + with: + helm-gcs-credentials: ${{ secrets.HELM_GCS_CREDENTIALS }} + helm-gcs-repository: ${{ secrets.HELM_GCS_REPOSITORY }} +