name: "CI" on: push: branches: - master pull_request: env: TEST_IMAGE_NAME: hadolint-action:${{github.sha}} jobs: lint: name: Lint runs-on: ubuntu-20.04 container: pipelinecomponents/hadolint:0.10.1 steps: - uses: actions/checkout@v2 - name: Run hadolint run: hadolint Dockerfile build-test: name: Build and Test runs-on: ubuntu-20.04 needs: ["lint"] steps: - uses: actions/checkout@v2 - name: Build Docker image run: docker build -t $TEST_IMAGE_NAME . - name: Run Structure tests uses: brpaz/structure-tests-action@v1.1.2 with: image: ${{ env.TEST_IMAGE_NAME }} integration-tests: name: Integration Tests runs-on: ubuntu-20.04 needs: build-test steps: - uses: actions/checkout@v2 - name: Run integration test uses: ./ with: dockerfile: testdata/Dockerfile release: if: github.event_name == 'push' && github.ref == 'refs/heads/master' name: Release runs-on: ubuntu-20.04 needs: integration-tests steps: - uses: actions/checkout@v2 - uses: cycjimmy/semantic-release-action@v2 with: extra_plugins: | @semantic-release/git env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}