mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-29 14:16:26 -04:00
Build pkg in docker
This commit is contained in:
parent
e04bb99d7a
commit
ff43986085
44
.github/workflows/build.yaml
vendored
44
.github/workflows/build.yaml
vendored
@ -25,7 +25,7 @@ jobs:
|
|||||||
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
|
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
|
||||||
echo "matrix=[\"ubuntu-latest\", \"arm64\"]" >> $GITHUB_OUTPUT
|
echo "matrix=[\"ubuntu-latest\", \"arm64\"]" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "matrix=[\"arm64\"]" >> $GITHUB_OUTPUT
|
echo "matrix=[\"ubuntu-latest\"]" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tarball:
|
tarball:
|
||||||
@ -54,7 +54,6 @@ jobs:
|
|||||||
gp/.build/tarball/*.tar.gz
|
gp/.build/tarball/*.tar.gz
|
||||||
|
|
||||||
build-deb:
|
build-deb:
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
needs:
|
needs:
|
||||||
- setup-matrix
|
- setup-matrix
|
||||||
- tarball
|
- tarball
|
||||||
@ -96,7 +95,6 @@ jobs:
|
|||||||
globalprotect-openconnect-*/.build/deb/*.deb
|
globalprotect-openconnect-*/.build/deb/*.deb
|
||||||
|
|
||||||
build-rpm:
|
build-rpm:
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
needs:
|
needs:
|
||||||
- setup-matrix
|
- setup-matrix
|
||||||
- tarball
|
- tarball
|
||||||
@ -147,36 +145,38 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
os: ${{fromJson(needs.setup-matrix.outputs.matrix)}}
|
os: ${{fromJson(needs.setup-matrix.outputs.matrix)}}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
container:
|
# container:
|
||||||
image: yuezk/gpdev:pkgbuild
|
# image: yuezk/gpdev:pkgbuild
|
||||||
credentials:
|
# credentials:
|
||||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
# username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
# password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- name: chown
|
|
||||||
run: |
|
|
||||||
echo "Current user: $(whoami)"
|
|
||||||
sudo chown -R $(whoami):$(whoami) .
|
|
||||||
ls -l
|
|
||||||
- name: Download tarball
|
- name: Download tarball
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: artifact-tarball
|
name: artifact-tarball
|
||||||
- name: Build PKGBUILD package
|
- name: Docker Login
|
||||||
|
run: echo ${{ secrets.DOCKER_HUB_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
|
||||||
|
- name: Init PKGBUILD package
|
||||||
run: |
|
run: |
|
||||||
tar -xzf globalprotect-openconnect-*.tar.gz
|
tar -xzf globalprotect-openconnect-*.tar.gz
|
||||||
cd globalprotect-openconnect-*/
|
cd globalprotect-openconnect-*/
|
||||||
|
|
||||||
make pkgbuild BUILD_FE=0
|
make init-pkgbuild BUILD_FE=0
|
||||||
- name: Install PKGBUILD package
|
- name: Build PKGBUILD package in Docker
|
||||||
run: |
|
run: |
|
||||||
cd globalprotect-openconnect-*/
|
cd globalprotect-openconnect-*/
|
||||||
sudo pacman -U --noconfirm .build/pkgbuild/*.pkg.tar.zst
|
docker run --rm -v $(pwd)/.build/pkgbuild:/pkgbuild yuezk/gpdev:pkgbuild ./build.sh
|
||||||
|
|
||||||
|
- name: Install PKGBUILD package in Docker
|
||||||
|
run: |
|
||||||
|
cd globalprotect-openconnect-*/
|
||||||
|
|
||||||
|
docker run \
|
||||||
|
--rm -v $(pwd)/.build/pkgbuild:/pkgbuild \
|
||||||
|
yuezk/gpdev:pkgbuild \
|
||||||
|
bash -c "sudo pacman -U --noconfirm /pkgbuild/*.pkg.tar.zst; gpclient --version; gpservice --version; gpauth --version; gpgui-helper --version;"
|
||||||
|
|
||||||
gpclient --version
|
|
||||||
gpservice --version
|
|
||||||
gpauth --version
|
|
||||||
gpgui-helper --version
|
|
||||||
- name: Upload PKGBUILD package
|
- name: Upload PKGBUILD package
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
@ -186,7 +186,6 @@ jobs:
|
|||||||
globalprotect-openconnect-*/.build/pkgbuild/*.pkg.tar.zst
|
globalprotect-openconnect-*/.build/pkgbuild/*.pkg.tar.zst
|
||||||
|
|
||||||
build-binary:
|
build-binary:
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
needs:
|
needs:
|
||||||
- setup-matrix
|
- setup-matrix
|
||||||
- tarball
|
- tarball
|
||||||
@ -229,7 +228,6 @@ jobs:
|
|||||||
globalprotect-openconnect-*/.build/binary/*.bin.tar.xz*
|
globalprotect-openconnect-*/.build/binary/*.bin.tar.xz*
|
||||||
|
|
||||||
build-gpgui:
|
build-gpgui:
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
needs:
|
needs:
|
||||||
- setup-matrix
|
- setup-matrix
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
export OFFLINE = @OFFLINE@
|
export OFFLINE = @OFFLINE@ BUILD_FE=0
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@
|
dh $@
|
||||||
|
@ -25,7 +25,7 @@ build() {
|
|||||||
# Must unset the CFLAGS, otherwise the build fails
|
# Must unset the CFLAGS, otherwise the build fails
|
||||||
unset CFLAGS
|
unset CFLAGS
|
||||||
|
|
||||||
make build OFFLINE=@OFFLINE@
|
make build OFFLINE=@OFFLINE@ BUILD_FE=0
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
|
@ -35,7 +35,9 @@ A GUI for GlobalProtect VPN, based on OpenConnect, supports the SSO authenticati
|
|||||||
%setup
|
%setup
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make build OFFLINE=@OFFLINE@
|
# The injected RUSTFLAGS could fail the build
|
||||||
|
unset RUSTFLAGS
|
||||||
|
make build OFFLINE=@OFFLINE@ BUILD_FE=0
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install
|
%make_install
|
||||||
|
Loading…
x
Reference in New Issue
Block a user