forked from cosmos/ibc-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tracked by epic: celestiaorg/devops#111 Changes: - remove unused workflows - use of common workflow for container build (mockserv) - let dependabot bump Dockerfile Please comment on all ideas, thoughts, and questions as a comment. Closes celestiaorg/devops#163 --------- Signed-off-by: Smuu <18609909+Smuu@users.noreply.github.com>
- Loading branch information
Showing
10 changed files
with
73 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,23 @@ | ||
name: build-mockserv | ||
name: mockserv Docker Build & Publish | ||
|
||
# Trigger on all push events, new semantic version tags, and all PRs | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- "**" | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
- "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+" | ||
- "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" | ||
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" | ||
pull_request: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: celestiaorg/rollmint-mockserv | ||
|
||
jobs: | ||
docker-build: | ||
if: github.event.pull_request.head.repo.full_name == github.repository | ||
runs-on: "ubuntu-latest" | ||
docker-security-build: | ||
permissions: | ||
contents: write | ||
packages: write | ||
steps: | ||
- name: "Checkout source code" | ||
uses: "actions/checkout@v3" | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.17 | ||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=sha,prefix=${{ env.TAG_PREFIX }} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to GHCR | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
platforms: linux/amd64, linux/arm64 | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
file: docker/mockserv.Dockerfile | ||
contents: write | ||
packages: write | ||
uses: celestiaorg/.github/.github/workflows/reusable_dockerfile_pipeline.yml@v0.1.0 # yamllint disable-line rule:line-length | ||
with: | ||
dockerfile: docker/mockserv.Dockerfile | ||
packageName: mockserv |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,55 @@ | ||
name: Linters | ||
# lint runs all linters in this repository. This workflow is run on every pull | ||
# request and push to main. | ||
name: lint | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_call: | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
golangci-lint: | ||
name: golangci-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.19 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3.4.0 | ||
# This steps sets the GIT_DIFF environment variable to true | ||
# if files defined in PATTERS changed | ||
- uses: technote-space/get-diff-action@v6.1.2 | ||
with: | ||
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version | ||
version: latest | ||
|
||
# Optional: working directory, useful for monorepos | ||
# working-directory: somedir | ||
|
||
# Optional: golangci-lint command line arguments. | ||
# args: --issues-exit-code=0 | ||
|
||
# Optional: show only new issues if it's a pull request. The default value is `false`. | ||
# only-new-issues: true | ||
# This job will pass without running if go.mod, go.sum, and *.go | ||
# wasn't modified. | ||
PATTERNS: | | ||
**/**.go | ||
go.mod | ||
go.sum | ||
- uses: golangci/golangci-lint-action@v3.4.0 | ||
with: | ||
version: v1.50.1 | ||
args: --timeout 10m | ||
github-token: ${{ secrets.github_token }} | ||
if: env.GIT_DIFF | ||
|
||
# Optional: if set to true then the action will use pre-installed Go. | ||
# skip-go-installation: true | ||
# hadolint lints the Dockerfile | ||
hadolint: | ||
uses: celestiaorg/.github/.github/workflows/reusable_dockerfile_lint.yml@v0.1.0 # yamllint disable-line rule:line-length | ||
with: | ||
dockerfile: docker/mockserv.Dockerfile | ||
|
||
# Optional: if set to true then the action don't cache or restore ~/go/pkg. | ||
# skip-pkg-cache: true | ||
yamllint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: celestiaorg/.github/.github/actions/yamllint@v0.1.0 | ||
|
||
# Optional: if set to true then the action don't cache or restore ~/.cache/go-build. | ||
# skip-build-cache: true | ||
markdownlint: | ||
markdown-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: markdownlint-cli | ||
uses: nosborn/github-action-markdown-cli@v3.3.0 | ||
with: | ||
files: . | ||
config-file: .markdownlint.yaml | ||
- uses: celestiaorg/.github/.github/actions/markdown-lint@v0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.