From e167f6329ad439c1962369d7b90c771f07d79b56 Mon Sep 17 00:00:00 2001 From: Ajaz Ahmed Ansari Date: Thu, 22 Dec 2022 13:40:01 +0530 Subject: [PATCH] docker gh-action and pr-template (#268) --- .github/.dependabot.yml | 22 ++++++++++---------- .github/pull_request_template.md | 35 ++++++++++++++++++++++++++++++++ .github/workflows/docker.yaml | 29 ++++++++++++++++++++++++++ .github/workflows/golangci.yml | 2 +- Dockerfile | 8 +++----- 5 files changed, 79 insertions(+), 17 deletions(-) create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/docker.yaml diff --git a/.github/.dependabot.yml b/.github/.dependabot.yml index d219fd4a5..6ca4b9f83 100644 --- a/.github/.dependabot.yml +++ b/.github/.dependabot.yml @@ -1,15 +1,15 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates - version: 2 updates: - - package-ecosystem: "github-actions" # See documentation for possible values - directory: "/" # Location of package manifests + - package-ecosystem: github-actions + directory: "/" schedule: - interval: "daily" - - package-ecosystem: "gomod" # See documentation for possible values - directory: "/" # Location of package manifests + interval: daily + open-pull-requests-limit: 10 + - package-ecosystem: gomod + directory: "/" schedule: - interval: "daily" + interval: daily + open-pull-requests-limit: 10 + labels: + - automerge + - dependencies diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..d5cb35482 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,35 @@ + +## 1. Summary +Fixes # (issue) + + +## 2.Type of change + +Please delete options that are not relevant. + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] This change requires a documentation update + +## 3. Implementation details + + + +## 4. How to test/use + + + +## 5. Checklist + + + +- [ ] Does the Readme need to be updated? + +## 6. Limitations (optional) + + + +## 7. Future Work (optional) + + \ No newline at end of file diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml new file mode 100644 index 000000000..9aa5cfb31 --- /dev/null +++ b/.github/workflows/docker.yaml @@ -0,0 +1,29 @@ +name: Docker + +on: + push: + branches: + - 'main' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push evinced + uses: docker/build-push-action@v3 + with: + push: true + tags: quicksilverzone/quicksilver:latest + file: Dockerfile diff --git a/.github/workflows/golangci.yml b/.github/workflows/golangci.yml index 1c0cc3a11..6b1a3af54 100644 --- a/.github/workflows/golangci.yml +++ b/.github/workflows/golangci.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.19 - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3 diff --git a/Dockerfile b/Dockerfile index e7d64c606..d2fb2fcf0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,11 +11,9 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ # Cosmwasm - download correct libwasmvm version RUN WASMVM_VERSION=$(go list -m github.com/CosmWasm/wasmvm | cut -d ' ' -f 2) && \ - wget https://github.com/CosmWasm/wasmvm/releases/download/$(WASMVM_VERSION)/libwasmvm_muslc.$(uname -m).a \ - -O /lib/libwasmvm_muslc.a - -# Cosmwasm - verify checksum -RUN wget https://github.com/CosmWasm/wasmvm/releases/download/$(WASMVM_VERSION)/checksums.txt -O /tmp/checksums.txt && \ + wget https://github.com/CosmWasm/wasmvm/releases/download/${WASMVM_VERSION}/libwasmvm_muslc.$(uname -m).a \ + -O /lib/libwasmvm_muslc.a && \ + wget https://github.com/CosmWasm/wasmvm/releases/download/${WASMVM_VERSION}/checksums.txt -O /tmp/checksums.txt && \ sha256sum /lib/libwasmvm_muslc.a | grep $(cat /tmp/checksums.txt | grep $(uname -m) | cut -d ' ' -f 1) COPY . .