diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml new file mode 100644 index 0000000000000000000000000000000000000000..9fe0739fc84eedfbe7b7f2df94f73456fc6ba3c4 --- /dev/null +++ b/.github/workflows/develop.yml @@ -0,0 +1,18 @@ +name: Develop +'on': + push: + branches: + - develop +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Publish to Docker Hub + uses: docker/build-push-action@92e71463491f2d026a477188b8ad3a0fdd9d672c + with: + repository: iotaledger/goshimmer + username: '${{ secrets.IOTALEDGER_HUB_DOCKER_LOGIN }}' + password: '${{ secrets.IOTALEDGER_HUB_DOCKER_PASSWORD }}' + tags: develop diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index 8d197c2fed30335f4f0793fbb4df893988df1fba..0000000000000000000000000000000000000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Publish Docker develop - -on: - push: - branches: - - develop - -jobs: - - build: - runs-on: ubuntu-latest - steps: - - - name: Check out code - uses: actions/checkout@master - - - name: Publish to registry - uses: elgohr/Publish-Docker-Github-Action@master - with: - name: iotagoshimmer/goshimmer - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - tags: "develop" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 37fc37fe61b9aaa1d61b557c08a515dcefbbc5d3..f69e06007f3a448fe30980005d96a93954c55e92 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,23 +1,38 @@ name: Release - -on: +'on': release: - types: [published] - + types: + - published jobs: - Release: - name: Release - runs-on: [ubuntu-latest] + goreleaser: + name: GoReleaser + runs-on: + - ubuntu-latest container: - image: iotmod/goreleaser-cgo-cross-compiler:1.14.4 - volumes: [/repo] - + image: 'iotmod/goreleaser-cgo-cross-compiler:1.14.4' + volumes: + - /repo steps: - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - - name: Copy config.default.json to config.json - run: cp config.default.json config.json - - name: Release GoShimmer - run: goreleaser --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout + uses: actions/checkout@v2 + - name: Copy config.default.json to config.json + run: cp config.default.json config.json + - name: Release GoShimmer + run: goreleaser --rm-dist + env: + GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' + docker: + name: Docker + runs-on: + - ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Publish to Docker Hub + uses: docker/build-push-action@92e71463491f2d026a477188b8ad3a0fdd9d672c + with: + repository: iotaledger/goshimmer + username: '${{ secrets.IOTALEDGER_HUB_DOCKER_LOGIN }}' + password: '${{ secrets.IOTALEDGER_HUB_DOCKER_PASSWORD }}' + tags: latest + tag_with_ref: true diff --git a/Dockerfile b/Dockerfile index 2048c32b2e926bb01537e2bd4d7fea44c1b1319d..42320aaeff591055f1fdcfee66a6c99b31f14c05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,11 @@ FROM gcr.io/distroless/static@sha256:23aa732bba4c8618c0d97c26a72a32997363d591807 EXPOSE 14666/tcp EXPOSE 14626/udp +# Copy configuration +COPY snapshot.bin /snapshot.bin +COPY config.default.json /config.json + # Copy the Pre-built binary file from the previous stage COPY --from=build /go/bin/goshimmer /run/goshimmer -ENTRYPOINT ["/run/goshimmer", "--config-dir=/", "--database.directory=/tmp/mainnetdb"] +ENTRYPOINT ["/run/goshimmer", "--config-dir=/", "--valueLayer.snapshot.file=/snapshot.bin", "--database.directory=/tmp/mainnetdb"]