Skip to content
Snippets Groups Projects
Unverified Commit 94a77f55 authored by Wolfgang Welz's avatar Wolfgang Welz Committed by GitHub
Browse files

Automatically publish Docker images (#581)

* publish docker image on release

* switch to iotaledger/goshimmer

* copy snapshot file into docker image

* copy config file to docker image

* use fixed docker/build-push-action
parent aa225124
No related branches found
No related tags found
No related merge requests found
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
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"
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
......@@ -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"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment