mirror of
https://github.com/kovetskiy/mark.git
synced 2025-04-24 05:42:40 +08:00
![dependabot[bot]](/assets/img/avatar_default.png)
Bumps [DavidAnson/markdownlint-cli2-action](https://github.com/davidanson/markdownlint-cli2-action) from 14 to 15. - [Release notes](https://github.com/davidanson/markdownlint-cli2-action/releases) - [Commits](https://github.com/davidanson/markdownlint-cli2-action/compare/v14...v15) --- updated-dependencies: - dependency-name: DavidAnson/markdownlint-cli2-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
113 lines
2.5 KiB
YAML
113 lines
2.5 KiB
YAML
name: continuous-integration
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags:
|
|
- '*'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
env:
|
|
GO_VERSION: "~1.21.6"
|
|
|
|
jobs:
|
|
# Runs Golangci-lint on the source code
|
|
ci-go-lint:
|
|
name: ci-go-lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go 1.x
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
id: go
|
|
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v3
|
|
|
|
# Runs markdown-lint on the markdown files
|
|
ci-markdown-lint:
|
|
name: ci-markdown-lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v4
|
|
- name: markdownlint-cli2-action
|
|
uses: DavidAnson/markdownlint-cli2-action@v15
|
|
|
|
# Executes Unit Tests
|
|
ci-unit-tests:
|
|
name: ci-unit-tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go 1.x
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
id: go
|
|
|
|
- name: Run unit tests
|
|
run: |
|
|
make test
|
|
|
|
# Builds mark binary
|
|
ci-build:
|
|
name: ci-build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Go 1.x
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
id: go
|
|
|
|
- name: Build mark
|
|
run: |
|
|
make build
|
|
|
|
# Build and push Dockerimage
|
|
ci-docker-build:
|
|
name: ci-docker-build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build only (on commits)
|
|
uses: docker/build-push-action@v5
|
|
if: ${{ github.ref_type != 'tag' }}
|
|
with:
|
|
push: false
|
|
tags: kovetskiy/mark:latest
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
if: ${{ github.ref_type == 'tag' }}
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
- name: Build and push (on tag)
|
|
uses: docker/build-push-action@v5
|
|
if: ${{ github.ref_type == 'tag' }}
|
|
with:
|
|
push: true
|
|
tags: |
|
|
kovetskiy/mark:${{ github.ref_name }}
|
|
kovetskiy/mark:latest
|