Skip to content

Commit 3d48407

Browse files
authored
Merge pull request #42 from 0xJacky/optimized-for-github-runner-2.298.2
Optimized for GitHub runner 2.298.2
2 parents 3d0c40e + f61dac3 commit 3d48407

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ jobs:
3333
runs-on: ubuntu-latest
3434
steps:
3535
- name: Checkout
36-
uses: actions/checkout@v2
36+
uses: actions/checkout@v3
3737

3838
- name: Set up nodejs
39-
uses: actions/setup-node@v2
39+
uses: actions/setup-node@v3
4040
with:
41-
node-version: '18.x'
41+
node-version: 18.x
4242
cache: 'yarn'
4343
cache-dependency-path: 'frontend/yarn.lock'
4444

@@ -57,7 +57,7 @@ jobs:
5757
working-directory: frontend
5858

5959
- name: Archive frontend artifacts
60-
uses: actions/upload-artifact@v2
60+
uses: actions/upload-artifact@v3
6161
with:
6262
name: frontend-dist
6363
path: frontend/dist
@@ -104,19 +104,19 @@ jobs:
104104
GOARM: ${{ matrix.goarm }}
105105
steps:
106106
- name: Checkout
107-
uses: actions/checkout@v2
107+
uses: actions/checkout@v3
108108

109109
- name: Get the version
110110
id: get_version
111-
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
111+
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
112112

113113
- name: Set up Go
114-
uses: actions/setup-go@v2
114+
uses: actions/setup-go@v3
115115
with:
116116
go-version: ^1.19.0
117117

118118
- name: Set up cache
119-
uses: actions/cache@v2
119+
uses: actions/cache@v3
120120
with:
121121
path: |
122122
~/.cache/go-build
@@ -138,7 +138,7 @@ jobs:
138138
139139
- name: Install musl cross compiler
140140
if: env.GOOS == 'linux'
141-
uses: Lesmiscore/[email protected]
141+
uses: 0xJacky/musl-cross-compilers@v0.6.5
142142
id: musl
143143
with:
144144
target: ${{ env.ARCH_NAME }}-linux-musl${{ env.ABI }}
@@ -163,7 +163,7 @@ jobs:
163163
echo "LD_FLAGS=-s -w" >> $GITHUB_ENV
164164
165165
- name: Download frontend artifacts
166-
uses: actions/download-artifact@v2
166+
uses: actions/download-artifact@v3
167167
with:
168168
name: frontend-dist
169169
path: frontend/dist
@@ -174,7 +174,7 @@ jobs:
174174
go build -ldflags "$LD_FLAGS -X 'github.com/0xJacky/Nginx-UI/server/settings.buildTime=$(date +%s)'" -o dist/nginx-ui -v main.go
175175
176176
- name: Archive backend artifacts
177-
uses: actions/upload-artifact@v2
177+
uses: actions/upload-artifact@v3
178178
with:
179179
name: ${{ env.DIST }}
180180
path: dist/nginx-ui
@@ -194,11 +194,11 @@ jobs:
194194
- name: Set up Docker Buildx
195195
if: env.GOOS == 'linux' && env.GOARCH == 'amd64'
196196
id: buildx
197-
uses: docker/setup-buildx-action@v1
197+
uses: docker/setup-buildx-action@v2
198198

199199
- name: Login to DockerHub
200200
if: env.GOOS == 'linux' && env.GOARCH == 'amd64'
201-
uses: docker/login-action@v1
201+
uses: docker/login-action@v2
202202
with:
203203
username: ${{ secrets.DOCKERHUB_USER }}
204204
password: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -211,7 +211,7 @@ jobs:
211211
212212
- name: Build and push
213213
if: github.event_name == 'release' && env.GOOS == 'linux' && env.GOARCH == 'amd64'
214-
uses: docker/build-push-action@v2
214+
uses: docker/build-push-action@v3
215215
with:
216216
context: ./dist
217217
file: ./dist/Dockerfile
@@ -229,7 +229,7 @@ jobs:
229229
230230
- name: Build and push demo
231231
if: env.GOOS == 'linux' && env.GOARCH == 'amd64'
232-
uses: docker/build-push-action@v2
232+
uses: docker/build-push-action@v3
233233
with:
234234
context: ./dist
235235
file: ./dist/demo.Dockerfile

0 commit comments

Comments
 (0)