-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from CounterpartyXCP/docker
Add github workflows
- Loading branch information
Showing
4 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |