diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..096b4d33f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,46 @@ +name: Release + +on: + release: + types: [published] + +jobs: + docker: + name: Release Docker + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: iotaledger/iota-core + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=match,pattern=v(\d+.\d+),suffix=-alpha,group=1,enable=${{ contains(github.ref, '-alpha') }} + type=match,pattern=v(\d+.\d+),suffix=-beta,group=1,enable=${{ contains(github.ref, '-beta') }} + type=match,pattern=v(\d+.\d+),suffix=-rc,group=1,enable=${{ contains(github.ref, '-rc') }} + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.IOTALEDGER_DOCKER_USERNAME }} + password: ${{ secrets.IOTALEDGER_DOCKER_PASSWORD }} + + - name: Build and push to Dockerhub + uses: docker/build-push-action@v5 + with: + file: ./Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ steps.meta.outputs.tags }} diff --git a/Dockerfile b/Dockerfile index ec10c0f75..41594b947 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,14 +8,20 @@ LABEL org.label-schema.name="iotaledger/iota-core" LABEL org.label-schema.schema-version="1.0" LABEL org.label-schema.vcs-url="https://github.com/iotaledger/iota-core" -RUN mkdir /scratch /app +# Ensure ca-certificates are up to date +RUN update-ca-certificates +# Set the current Working Directory inside the container +RUN mkdir /scratch WORKDIR /scratch -COPY . . +# Prepare the folder where we are putting all the files +RUN mkdir /app -# Ensure ca-certificates are up to date -RUN update-ca-certificates +WORKDIR /scratch + +# Copy everything from the current directory to the PWD(Present Working Directory) inside the container +COPY . . # Download go modules RUN go mod download diff --git a/components/app/app.go b/components/app/app.go index 5f840eb4c..3bb481949 100644 --- a/components/app/app.go +++ b/components/app/app.go @@ -25,7 +25,7 @@ var ( Name = "iota-core" // Version of the app. - Version = "0.1.0" + Version = "1.0.0-alpha.1" ) func App() *app.App {