Skip to content

Commit

Permalink
gha (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
ToniRamirezM committed Apr 29, 2024
1 parent 23c4731 commit c00b63d
Show file tree
Hide file tree
Showing 9 changed files with 182 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Report a bug
about: Something with Polygon zkEVM SequenceSender is not working as expected
title: ''
labels: 'type:bug'
assignees: ''
---

#### System information

zkEVM SequenceSender version: `v0.0.X-RCXX`
OS & Version: `Windows/Linux/OSX`
Commit hash : (if `develop`)
Network: `Mainnet/Testnet`

#### Expected behaviour


#### Actual behaviour


#### Steps to reproduce the behaviour


#### Backtrace

````
[backtrace]
````

When submitting logs: please submit them as text and not screenshots.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Request a feature
about: Report a missing feature - e.g. as a step before submitting a PR
title: ''
labels: 'type:feature'
assignees: ''
---

# Rationale

Why should this feature exist?
What are the use-cases?

# Implementation

Do you have ideas regarding the implementation of this feature?
Are you willing to implement this feature?
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: Ask a question
about: Something is unclear
title: ''
labels: 'type:question'
assignees: ''
---

This should only be used in very rare cases e.g. if you are not 100% sure if something is a bug or asking a question that leads to improving the documentation.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
7 changes: 7 additions & 0 deletions .github/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# Only run lint if .go files changed
git diff --cached --name-only | if grep --quiet ".*go$"
then
make lint
fi
22 changes: 22 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Closes #<issue number>.

### What does this PR do?

<!-- Describe your changes here- ideally you can get that description straight from
your descriptive commit message(s)! -->

### Reviewers

Main reviewers:

<!-- Main reviewers should do a full review. There should be 2 main reviewers, unless there is a good reason for not to do it -->

- @John
- @Doe

Codeowner reviewers:

<!-- Codeowners should review only the part of code that they own, they're added automatically as reviewers and it's good to let them know that they shouldn't do a full review -->

- @-Alice
- @-Bob
24 changes: 24 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint
on:
push:
branches:
- main
- master
- develop
- update-external-dependencies
- 'release/**'
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.21.x
- name: Checkout code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Lint
run: |
make install-linter
make lint
32 changes: 32 additions & 0 deletions .github/workflows/push-docker-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
on:
push:
branches:
- develop

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
tags: |
hermeznetwork/zkevm-seqsender:develop
33 changes: 33 additions & 0 deletions .github/workflows/push-docker-tagged.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' # this action will only run on tags that follow semver

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
hermeznetwork/zkevm-seqsender:${{ github.ref_name }}

0 comments on commit c00b63d

Please sign in to comment.