返回提交历史
Modified
.github/workflows/build-packages.yml
+13
-10
Modified
.github/workflows/publish-to-pypi.yml
+1
-1
XFEstudio/gpt4free
fix: pin 8 unpinned action(s),extract 2 unsafe expression(s) to env vars
b2787fd6
代码差异
2 个文件
+14
-11
@@ -22,8 +22,8 @@ jobs:
22
22
- name: Determine version
23
23
id: version
24
24
run: |
25
if [[ "${{ github.ref }}" =~ ^refs/tags/ ]]; then
26
G4F_VERSION="${{ github.ref_name }}"
25
if [[ "${GIT_REF}" =~ ^refs/tags/ ]]; then
26
G4F_VERSION="${REF_NAME}"
27
27
IS_RELEASE="true"
28
28
elif [[ -n "${{ inputs.version }}" ]]; then
29
29
G4F_VERSION="${{ inputs.version }}"
@@ -36,6 +36,9 @@ jobs:
36
36
echo "is_release=${IS_RELEASE}" >> $GITHUB_OUTPUT
37
37
echo "Building version: ${G4F_VERSION}"
38
38
39
env:
40
GIT_REF: ${{ github.ref }}
41
REF_NAME: ${{ github.ref_name }}
39
42
# PyPI Package
40
43
build-pypi:
41
44
runs-on: ubuntu-latest
@@ -245,12 +248,12 @@ jobs:
245
248
- name: Checkout repository
246
249
uses: actions/checkout@v4
247
250
- name: Set up QEMU
248
uses: docker/setup-qemu-action@v3
251
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3
249
252
- name: Set up Docker Buildx
250
uses: docker/setup-buildx-action@v3
253
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
251
254
- name: Get metadata for Docker
252
255
id: metadata
253
uses: docker/metadata-action@v5
256
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5
254
257
with:
255
258
images: |
256
259
hlohaus789/g4f
@@ -260,7 +263,7 @@ jobs:
260
263
username: ${{ secrets.DOCKER_USERNAME }}
261
264
password: ${{ secrets.DOCKER_PASSWORD }}
262
265
- name: Build and push armv7 image
263
uses: docker/build-push-action@v5
266
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
264
267
with:
265
268
context: .
266
269
file: docker/Dockerfile-armv7
@@ -273,7 +276,7 @@ jobs:
273
276
build-args: |
274
277
G4F_VERSION=${{ needs.prepare.outputs.version }}
275
278
- name: Build and push slim images
276
uses: docker/build-push-action@v5
279
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
277
280
with:
278
281
context: .
279
282
file: docker/Dockerfile-slim
@@ -286,7 +289,7 @@ jobs:
286
289
build-args: |
287
290
G4F_VERSION=${{ needs.prepare.outputs.version }}
288
291
- name: Build and push image
289
uses: docker/build-push-action@v5
292
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5
290
293
with:
291
294
context: .
292
295
file: docker/Dockerfile
@@ -426,7 +429,7 @@ jobs:
426
429
echo "Downloaded artifacts:"
427
430
find ./artifacts -type f -name "*" | sort
428
431
- name: Create Release with Assets
429
uses: softprops/action-gh-release@v2
432
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2
430
433
with:
431
434
tag_name: ${{ needs.prepare.outputs.version }}
432
435
name: Release ${{ needs.prepare.outputs.version }}
@@ -485,4 +488,4 @@ jobs:
485
488
# name: pypi-package
486
489
# path: dist/
487
490
# - name: Publish to PyPI
488
# uses: pypa/gh-action-pypi-publish@release/v1
491
# uses: pypa/gh-action-pypi-publish@release/v1
@@ -48,4 +48,4 @@ jobs:
48
48
name: python-package-distributions
49
49
path: dist/
50
50
- name: Publish distribution 📦 to PyPI
51
uses: pypa/gh-action-pypi-publish@release/v1
51
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # release/v1