diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..4108200 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,18 @@ +--- +name: Report a bug +about: Report incorrect or unexpected behavior. +title: '' +labels: bug +assignees: adamkrellenstein + +--- + +**Describe the Problem** +A clear and concise description of what the problem is. What was the expected behavior? + +**Steps To Reproduce** +Steps to reproduce the behavior: +1. ... + +**Screenshots and Logfiles** +If applicable, upload screenshots and logfiles to help explain your problem. Please run everything with the `--verbose` flag when possible. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..d075a0a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Request a feature +about: Suggest an improvement! +title: '' +labels: enhancement +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. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/build_docker_image.yml b/.github/workflows/build_docker_image.yml new file mode 100644 index 0000000..d311c47 --- /dev/null +++ b/.github/workflows/build_docker_image.yml @@ -0,0 +1,21 @@ +name: Build Docker Image + +on: + push: + branches: "**" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Docker + run: | + curl -fsSL https://get.docker.com -o get-docker.sh + sudo sh get-docker.sh + - name: Build image + run: | + docker build -t addrindexrs . + - name: Test image + run: | + docker run --rm addrindexrs -h diff --git a/.github/workflows/publish_docker_image.yml b/.github/workflows/publish_docker_image.yml new file mode 100644 index 0000000..d6ad2fc --- /dev/null +++ b/.github/workflows/publish_docker_image.yml @@ -0,0 +1,28 @@ +name: Publish Docker Image + +on: + release: + types: [published] + +env: + DOCKER_REPO: counterparty/addrindexrs + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Docker + run: | + curl -fsSL https://get.docker.com -o get-docker.sh + sudo sh get-docker.sh + - name: Build, tag, login and push image + run: | + export VERSION=v$(cat Cargo.toml | grep '^version =' | awk -F '"' '{print $2}') + docker build -t $DOCKER_REPO:$VERSION . + docker tag $DOCKER_REPO:$VERSION $DOCKER_REPO:latest + docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD" + docker push $DOCKER_REPO:$VERSION + docker push $DOCKER_REPO:latest