mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 22:46:14 -05:00
ci: avoid Docker Hub auth pulls in release builds
This commit is contained in:
2 files changed
+7
-6
No files matched your search
@@ -130,6 +130,7 @@ jobs:
|
|||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
build-gp:
|
build-gp:
|
||||||
|
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||||
needs:
|
needs:
|
||||||
- tarball
|
- tarball
|
||||||
strategy:
|
strategy:
|
||||||
@@ -154,8 +155,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: artifact-source
|
name: artifact-source
|
||||||
path: build-gp-${{ matrix.package }}
|
path: build-gp-${{ matrix.package }}
|
||||||
- name: Docker Login
|
|
||||||
run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
|
|
||||||
- name: Build ${{ matrix.package }} package in Docker
|
- name: Build ${{ matrix.package }} package in Docker
|
||||||
# LIBXML2_STATIC is needed to avoid the dynamic linking issue on different distros
|
# LIBXML2_STATIC is needed to avoid the dynamic linking issue on different distros
|
||||||
run: |
|
run: |
|
||||||
@@ -183,6 +182,7 @@ jobs:
|
|||||||
build-gp-${{ matrix.package }}/artifacts/*
|
build-gp-${{ matrix.package }}/artifacts/*
|
||||||
|
|
||||||
build-docker-image:
|
build-docker-image:
|
||||||
|
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -243,6 +243,7 @@ jobs:
|
|||||||
build-gpgui:
|
build-gpgui:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
max-parallel: 1
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
os:
|
||||||
- runner: ubuntu-latest
|
- runner: ubuntu-latest
|
||||||
@@ -283,8 +284,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd gpgui-source
|
cd gpgui-source
|
||||||
tar -czf gpgui.tar.gz gpgui gp
|
tar -czf gpgui.tar.gz gpgui gp
|
||||||
- name: Docker Login
|
|
||||||
run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
|
|
||||||
- name: Build gpgui in Docker
|
- name: Build gpgui in Docker
|
||||||
run: |
|
run: |
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
@@ -601,6 +600,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NEEDS_JSON: ${{ toJson(needs) }}
|
NEEDS_JSON: ${{ toJson(needs) }}
|
||||||
BSD_MATRIX_ENABLED: ${{ needs.setup-bsd-matrix.outputs.enabled }}
|
BSD_MATRIX_ENABLED: ${{ needs.setup-bsd-matrix.outputs.enabled }}
|
||||||
|
IS_TAG: ${{ startsWith(github.ref, 'refs/tags/') }}
|
||||||
run: |
|
run: |
|
||||||
python3 - <<'PY'
|
python3 - <<'PY'
|
||||||
import json
|
import json
|
||||||
@@ -609,12 +609,15 @@ jobs:
|
|||||||
|
|
||||||
needs = json.loads(os.environ["NEEDS_JSON"])
|
needs = json.loads(os.environ["NEEDS_JSON"])
|
||||||
bsd_matrix_enabled = os.environ["BSD_MATRIX_ENABLED"] == "true"
|
bsd_matrix_enabled = os.environ["BSD_MATRIX_ENABLED"] == "true"
|
||||||
|
is_tag = os.environ["IS_TAG"] == "true"
|
||||||
failed = []
|
failed = []
|
||||||
|
|
||||||
for name, data in needs.items():
|
for name, data in needs.items():
|
||||||
result = data["result"]
|
result = data["result"]
|
||||||
if result in {"failure", "cancelled"}:
|
if result in {"failure", "cancelled"}:
|
||||||
failed.append(f"{name}: {result}")
|
failed.append(f"{name}: {result}")
|
||||||
|
elif name in {"build-gp", "build-docker-image"} and result == "skipped" and is_tag:
|
||||||
|
continue
|
||||||
elif name in {"build-gpgui-frontend", "build-bsd"} and result == "skipped" and not bsd_matrix_enabled:
|
elif name in {"build-gpgui-frontend", "build-bsd"} and result == "skipped" and not bsd_matrix_enabled:
|
||||||
continue
|
continue
|
||||||
elif result == "skipped":
|
elif result == "skipped":
|
||||||
|
|||||||
@@ -117,8 +117,6 @@ jobs:
|
|||||||
--pattern '*[^offline].tar.gz' \
|
--pattern '*[^offline].tar.gz' \
|
||||||
--dir build-${{ matrix.package }}
|
--dir build-${{ matrix.package }}
|
||||||
|
|
||||||
- name: Docker Login
|
|
||||||
run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
|
|
||||||
- name: Build ${{ matrix.package }} package in Docker
|
- name: Build ${{ matrix.package }} package in Docker
|
||||||
# LIBXML2_STATIC is needed to avoid the dynamic linking issue on different distros
|
# LIBXML2_STATIC is needed to avoid the dynamic linking issue on different distros
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in new issue
Block a user