From 6064213f2d72c15971ed67bffe92a26d45bbe37d Mon Sep 17 00:00:00 2001 From: Joatin Granlund Date: Mon, 6 Jan 2025 19:18:22 +0100 Subject: [PATCH] pipeline --- .github/workflows/release.yaml | 17 +++-------------- Dockerfile | 7 ++++++- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 7b4c83a..cf9621a 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -61,7 +61,7 @@ jobs: uses: actions/checkout@v3 - run: sudo apt-get install --yes --no-install-recommends musl-tools - + - name: "Setup Protoc" uses: arduino/setup-protoc@v3 @@ -75,7 +75,7 @@ jobs: - name: Build archive shell: bash run: | - dirname="ocpp-csms-server-${{ env.VERSION }}-x86_64-unknown-linux-musl" + dirname="ocpp-csms-server-${{ needs.get-tag.outputs.pkg-version }}-x86_64-unknown-linux-musl" mkdir "$dirname" mv "target/x86_64-unknown-linux-musl/release/ocpp" "$dirname" mv "target/x86_64-unknown-linux-musl/release/api" "$dirname" @@ -85,20 +85,9 @@ jobs: - uses: AButler/upload-release-assets@v3.0 with: - files: "ocpp-csms-server-${{ env.VERSION }}-x86_64-unknown-linux-musl.tar.gz" + files: "ocpp-csms-server-${{ needs.get-tag.outputs.pkg-version }}-x86_64-unknown-linux-musl.tar.gz" repo-token: ${{ secrets.GITHUB_TOKEN }} release-tag: v${{ needs.get-tag.outputs.pkg-version }} - - - push-to-registry: - name: "Push Docker image to Docker Hub" - needs: - - "get-tag" - - "upload-assets" - runs-on: "ubuntu-latest" - steps: - - name: "Check out the repo" - uses: actions/checkout@v3 - name: "Log in to Github Packages" uses: "docker/login-action@v2" diff --git a/Dockerfile b/Dockerfile index 87b8ba8..b46015d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,4 +4,9 @@ FROM debian:bookworm-slim EXPOSE 3000 -CMD ["/bin/server"] \ No newline at end of file +WORKDIR /bin + +COPY target/x86_64-unknown-linux-musl/release/ocpp ./ +COPY target/x86_64-unknown-linux-musl/release/api ./ + +CMD ["/bin/ocpp"] \ No newline at end of file