diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cefcd46a..341f61c9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,8 +8,40 @@ env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} jobs: + test: + name: Test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Docker Lint + id: docker-lint + run: | + docker run --rm -i ghcr.io/hadolint/hadolint hadolint \ + --ignore DL3008 \ + --ignore DL3059 \ + - < Dockerfile + - name: Run tests + id: smoketest + run: >- + BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") + RELEASE=$(cat VERSION) + VERSION=${{ github.sha }} + docker-compose + -f tests/docker-compose.test.mongodb.yml + up + --build + --quiet-pull + --exit-code-from tester + - uses: act10ns/slack@v2 + with: + status: ${{ job.status }} + steps: ${{ toJson(steps) }} + if: failure() + push: name: Docker Push + needs: test runs-on: ubuntu-latest if: github.event_name == 'push' @@ -31,7 +63,7 @@ jobs: -t $REPOSITORY_URL/$IMAGE_NAME:$(git rev-parse --short HEAD) -t $REPOSITORY_URL/$IMAGE_NAME:latest . - name: Docker Login - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ${{ env.REPOSITORY_URL }} username: ${{ github.actor }}