Update release.yml

This commit is contained in:
ffdfgdfg 2020-10-06 16:45:20 +08:00 committed by GitHub
parent a01e0100ed
commit 3bed88a75d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 7 deletions

View File

@ -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 }}