Skip to content

Commit

Permalink
adding github actions files + docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Mzack9999 committed Jan 11, 2021
1 parent 598344e commit 613674f
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/feature_request.md
@@ -0,0 +1,14 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[feature]"
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
18 changes: 18 additions & 0 deletions .github/issue-report.md
@@ -0,0 +1,18 @@
---
name: Issue report
about: Create a report to help us improve
title: "[issue]"
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**Nuclei version**
Please share the version of the nuclei you are running with `simplehttpserver -version`


**Screenshot of the error or bug**
please add the screenshot showing bug or issue you are facing.
48 changes: 48 additions & 0 deletions .github/workflows/build.yaml
@@ -0,0 +1,48 @@
name: Build
on:
push:
branches:
- master
pull_request:

jobs:
lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2.2.0
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.31
args: --timeout 5m

# 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
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14

- name: Check out code
uses: actions/checkout@v2

- name: Test
run: go test .
working-directory: .

- name: Build
run: go build .
working-directory: .
17 changes: 17 additions & 0 deletions .github/workflows/dockerhub-push.yml
@@ -0,0 +1,17 @@
# dockerhub-push pushes docker build to dockerhub automatically
# on the creation of a new release
name: Publish to Dockerhub on creation of a new release
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Publish to Dockerhub Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: projectdiscovery/simplehttpserver
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,28 @@
name: Release
on:
create:
tags:
- v*

jobs:
release:
runs-on: ubuntu-latest
steps:
-
name: "Check out code"
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: "Set up Go"
uses: actions/setup-go@v2
with:
go-version: 1.14
-
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
name: "Create release on GitHub"
uses: goreleaser/goreleaser-action@v2
with:
args: "release --rm-dist"
version: latest

0 comments on commit 613674f

Please sign in to comment.