Skip to content

Commit

Permalink
Merge pull request #23 from xelis-project/dev
Browse files Browse the repository at this point in the history
Version 1.8.0
  • Loading branch information
Slixe committed Mar 27, 2024
2 parents a175531 + 5906434 commit e2dd57b
Show file tree
Hide file tree
Showing 130 changed files with 19,901 additions and 7,216 deletions.
25 changes: 25 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## Description

Please include a summary of the changes and the related issue.

## Type of change

Please select the right one.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update

## Which part is impacted ?

- [ ] Daemon
- [ ] Wallet
- [ ] Miner
- [ ] Misc (documentation, comments, text...)

## Checklist

- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] My changes generate no new warnings
72 changes: 72 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Docker

on:
push:
branches: [ "master" ]
tags: [ "v**" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '0 14 * * *'

env:
SHOULD_PUSH: ${{ github.event_name != 'pull_request' && (github.ref_type == 'tag' || github.ref == 'refs/heads/dev') }}

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
strategy:
matrix:
app:
- daemon
- miner
- wallet
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3

- name: Log in to the Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: xelis
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Retrieve version from Cargo.toml
run: |
VERSION=`awk -F ' = ' '$1 ~ /version/ { gsub(/[\\"]/, "", $2); printf("%s",$2) }' xelis_${{ matrix.app }}/Cargo.toml`
echo "XELIS_VERSION=${VERSION}" >> "$GITHUB_ENV"
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: xelis/${{ matrix.app }}
labels: |
org.opencontainers.image.title=Xelis ${{ matrix.app }}
tags: |
type=schedule,pattern=${{ env.XELIS_VERSION }}-nightly-{{date 'YYYYMMDD'}}
type=semver,pattern={{version}},event=tag
type=ref,event=pr
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
context: .
push: ${{ env.SHOULD_PUSH }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
app=xelis_${{ matrix.app }}
commit_hash=${{ github.sha }}
platforms: ${{ env.SHOULD_PUSH && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,8 @@ build/
# ignore all profiling files
flamegraph.svg
perf.data
perf.data.old
perf.data.old

# ignore generated files by XELIS
difficulty_dataset.csv
precomputed_tables_*.bin

0 comments on commit e2dd57b

Please sign in to comment.