Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Add github workflows #19

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -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.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -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.
21 changes: 21 additions & 0 deletions .github/workflows/build_docker_image.yml
Original file line number Diff line number Diff line change
@@ -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
28 changes: 28 additions & 0 deletions .github/workflows/publish_docker_image.yml
Original file line number Diff line number Diff line change
@@ -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
Loading