diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6d22067..45f9eac 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,14 +51,14 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 - name: Set env - run: echo ::set-env name=VERSION::${GITHUB_REF#refs/*/} + run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/} - name: Build run: | git clone https://github.com/cnlh/spksrc.git ~/spksrc mkdir ~/spksrc/nps && cp -rf ./* ~/spksrc/nps/ - docker run -itd --name spksrc --env VERSION=$VERSION -e GOPROXY=direct -v ~/spksrc:/spksrc synocommunity/spksrc /bin/bash - docker exec -it spksrc /bin/bash -c 'cd /spksrc && make setup && cd /spksrc/spk/npc && make' - cp ~/spksrc/packages/npc_noarch-all_$VERSION-1.spk ./npc_syno.spk + docker run -d --name spksrc --env VERSION=${{ env.RELEASE_VERSION }} -e GOPROXY=direct -v ~/spksrc:/spksrc synocommunity/spksrc /bin/bash + docker exec spksrc /bin/bash -c 'cd /spksrc && make setup && cd /spksrc/spk/npc && make' + cp ~/spksrc/packages/npc_noarch-all_${{ env.RELEASE_VERSION }}-1.spk ./npc_syno.spk build_docker: @@ -68,7 +68,7 @@ jobs: - name: Check out code into the Go module directory uses: actions/checkout@v2 - name: Set env - run: echo ::set-env name=VERSION::${GITHUB_REF#refs/*/} + run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/} - name: Set up QEMU uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx @@ -87,7 +87,7 @@ jobs: push: true tags: | ${{ secrets.DOCKERHUB_USERNAME }}/nps:latest - ${{ secrets.DOCKERHUB_USERNAME }}/nps:$VERSION + ${{ secrets.DOCKERHUB_USERNAME }}/nps:${{ env.RELEASE_VERSION }} - name: Build and push npc uses: docker/build-push-action@v2 with: @@ -97,4 +97,4 @@ jobs: push: true tags: | ${{ secrets.DOCKERHUB_USERNAME }}/npc:latest - ${{ secrets.DOCKERHUB_USERNAME }}/npc:$VERSION + ${{ secrets.DOCKERHUB_USERNAME }}/npc:${{ env.RELEASE_VERSION }}