Skip to content

Commit a8a0a1d

Browse files
authored
Update release.yml
1 parent b7d7d9e commit a8a0a1d

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
- name: Check out code into the Go module directory
100100
uses: actions/checkout@v2
101101
- name: Set env
102-
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/}
102+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
103103
- name: Build
104104
run: |
105105
git clone https://github.com/cnlh/spksrc.git ~/spksrc
@@ -124,11 +124,18 @@ jobs:
124124
- name: Check out code into the Go module directory
125125
uses: actions/checkout@v2
126126
- name: Set env
127-
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/}
127+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
128128
- name: Set up QEMU
129129
uses: docker/setup-qemu-action@v1
130130
- name: Set up Docker Buildx
131131
uses: docker/setup-buildx-action@v1
132+
- name: Cache Docker layers
133+
uses: actions/cache@v2
134+
with:
135+
path: /tmp/.buildx-cache
136+
key: ${{ runner.os }}-buildx-${{ github.sha }}
137+
restore-keys: |
138+
${{ runner.os }}-buildx-
132139
- name: Login to DockerHub
133140
uses: docker/login-action@v1
134141
with:
@@ -139,7 +146,7 @@ jobs:
139146
with:
140147
context: .
141148
file: ./Dockerfile.nps
142-
platforms: linux/386,linux/amd64,linux/arm,linux/arm64
149+
platforms: linux/amd64,linux/arm,linux/arm64
143150
push: true
144151
tags: |
145152
${{ secrets.DOCKERHUB_USERNAME }}/nps:latest
@@ -149,7 +156,7 @@ jobs:
149156
with:
150157
context: .
151158
file: ./Dockerfile.npc
152-
platforms: linux/386,linux/amd64,linux/arm,linux/arm64
159+
platforms: linux/amd64,linux/arm,linux/arm64
153160
push: true
154161
tags: |
155162
${{ secrets.DOCKERHUB_USERNAME }}/npc:latest

0 commit comments

Comments
 (0)