Skip to content

Commit

Permalink
Dockerize AcceptXMR-Server (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
busyboredom committed Aug 8, 2023
1 parent ea8245c commit 4f63315
Show file tree
Hide file tree
Showing 11 changed files with 3,630 additions and 35 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[registries.crates-io]
protocol = "sparse"
61 changes: 61 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: docker-ci

on:
push:
branches:
- 'main'
tags:
- 'acceptxmr-server-v*.*.*'
pull_request:
branches:
- '*'

env:
RELEASE: |
${{
github.event.pull_request.merged == true ||
github.ref_name =='main' ||
github.ref_type == 'tag'
}}
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
busyboredom/acceptxmr
tags: |
type=match,pattern=acceptxmr-server-v(\d.\d.\d),group=1
type=match,pattern=acceptxmr-server-v(\d.\d),group=1
type=match,pattern=acceptxmr-server-v(\d),group=1
type=sha
-

name: Login to DockerHub
if: ${{ env.RELEASE }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ env.RELEASE }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml → .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
name: CI
name: rust-ci

on:
push:
branches: [ main ]
branches:
- 'main'
tags:
- '*'
pull_request:
branches: [ main ]
branches:
- '*'

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: '-D warnings'
Expand Down Expand Up @@ -31,7 +37,6 @@ jobs:
matrix:
rust: [
1.68.0,
stable,
nightly
]

Expand All @@ -54,7 +59,6 @@ jobs:
matrix:
rust: [
1.68.0,
stable,
nightly
]

Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/target
AcceptXMR_DB
Cargo.lock
Loading

0 comments on commit 4f63315

Please sign in to comment.