catch up with workflow changes

* I was gone for a while and will try to catch up with upstream changes in the next couple of commits
* since git can't know I'm "combining" multiple files, an automatic merge wouldn't work here
* added todo comments on places that will need special attention
* dockerfiles still need merging -> this commit is broken! (only using it to keep track of external changes)
pull/1118/head
Willy 2021-10-02 16:13:42 +02:00
parent e896d8afbc
commit 3f948126a3
No known key found for this signature in database
GPG Key ID: 02E60AE5D9208602
1 changed files with 27 additions and 9 deletions

View File

@ -91,11 +91,13 @@ jobs:
matrix: matrix:
platform: [linux] platform: [linux]
arch: [386, amd64, arm-7, arm-6, arm64] arch: [386, amd64, arm-7, arm-6, arm64]
# include: include:
# - platform: darwin - platform: darwin
# arch: amd64 arch: 386
# - platform: windows - platform: darwin
# arch: amd64 arch: amd64
- platform: windows
arch: [amd64, 386]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -136,7 +138,7 @@ jobs:
- name: Set Windows Build Flags - name: Set Windows Build Flags
if: matrix.platform == 'windows' if: matrix.platform == 'windows'
run: | run: |
echo "BUILD_FLAGS=-extldflags -static" >> $GITHUB_ENV echo "BUILD_FLAGS=-extldflags -static -buildmode=exe" >> $GITHUB_ENV
echo "XGO_TAGS=netgo osusergo sqlite_omit_load_extension" >> $GITHUB_ENV echo "XGO_TAGS=netgo osusergo sqlite_omit_load_extension" >> $GITHUB_ENV
shell: bash shell: bash
@ -179,16 +181,30 @@ jobs:
rm -rf statping.exe rm -rf statping.exe
echo "compressed=statping-windows-${{ matrix.arch }}.zip" >> $GITHUB_ENV echo "compressed=statping-windows-${{ matrix.arch }}.zip" >> $GITHUB_ENV
- name: Compress Darwin Builds # TODO combine these steps?
if: matrix.platform == 'darwin' - name: Compress Darwin 32bit Builds
if: matrix.platform == 'darwin' && matrix.arch == '386'
run: | run: |
cd build cd build
mv statping-darwin-10.6-${{ matrix.arch }} statping ls >> $GITHUB_ENV
# mv statping-darwin-10.6-${{ matrix.arch }} statping
# chmod +x statping
# tar -czvf statping-darwin-${{ matrix.arch }}.tar.gz *
# rm -rf statping
# echo "compressed=statping-darwin-${{ matrix.arch }}.tar.gz" >> $GITHUB_ENV
- name: Compress Darwin 64bit Builds
if: matrix.platform == 'darwin' && matrix.arch == 'amd64'
run: |
cd build
mv statping-darwin-10.12-${{ matrix.arch }} statping
chmod +x statping chmod +x statping
tar -czvf statping-darwin-${{ matrix.arch }}.tar.gz statping tar -czvf statping-darwin-${{ matrix.arch }}.tar.gz statping
rm -rf statping rm -rf statping
echo "compressed=statping-darwin-${{ matrix.arch }}.tar.gz" >> $GITHUB_ENV echo "compressed=statping-darwin-${{ matrix.arch }}.tar.gz" >> $GITHUB_ENV
# TODO darwin arm64?
- name: Upload Compiled Statping Binary - name: Upload Compiled Statping Binary
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
@ -528,12 +544,14 @@ jobs:
restore-keys: | restore-keys: |
buildx-docker-master buildx-docker-master
# TODO duplicate login why?
- name: Docker Login - name: Docker Login
env: env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
# TODO get rid of the base image
- name: Docker Build :base - name: Docker Build :base
run: make buildx-base run: make buildx-base