another try
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Release Alpine apk for ARM64v8 Edge / compilation-arm64v8 (push) Failing after -1m58s
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Release Alpine apk for ARM64v8 Edge / compilation-arm64v8 (push) Failing after -1m58s
				
			This commit is contained in:
		
							parent
							
								
									6d530432d5
								
							
						
					
					
						commit
						52b754b5d8
					
				
					 1 changed files with 30 additions and 34 deletions
				
			
		| 
						 | 
					@ -18,9 +18,8 @@ jobs:
 | 
				
			||||||
        shell: sh
 | 
					        shell: sh
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          # faster mirror + essential build tools
 | 
					          # faster mirror + essential build tools
 | 
				
			||||||
          echo "https://alpine.sakamoto.pl/alpine/$(cat /etc/os-release | grep PRETT | cut -d ' ' -f 3 | cut -d '"' -f 1)/main" > /etc/apk/repositories
 | 
					          MIRROR="https://alpine.sakamoto.pl/alpine/$(. /etc/os-release; echo $PRETTY_NAME | cut -d '"' -f2)"
 | 
				
			||||||
          echo "https://alpine.sakamoto.pl/alpine/$(cat /etc/os-release | grep PRETT | cut -d ' ' -f 3 | cut -d '"' -f 1)/community" >> /etc/apk/repositories
 | 
					          printf "%s/main\n%s/community\n%s/testing\n" "$MIRROR" "$MIRROR" "$MIRROR" > /etc/apk/repositories
 | 
				
			||||||
          echo "https://alpine.sakamoto.pl/alpine/$(cat /etc/os-release | grep PRETT | cut -d ' ' -f 3 | cut -d '"' -f 1)/testing" >> /etc/apk/repositories
 | 
					 | 
				
			||||||
          apk update && apk upgrade
 | 
					          apk update && apk upgrade
 | 
				
			||||||
          apk add bash git curl alpine-sdk abuild sudo shadow fuse sshfs nodejs wget
 | 
					          apk add bash git curl alpine-sdk abuild sudo shadow fuse sshfs nodejs wget
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -46,7 +45,7 @@ jobs:
 | 
				
			||||||
          su - runner -c 'wget -q https://static.itmodulo.eu/dl/repo/public_keys/alpine/itmodulo%40disroot.org-65b4f779.rsa.pub -P ~/.abuild/'
 | 
					          su - runner -c 'wget -q https://static.itmodulo.eu/dl/repo/public_keys/alpine/itmodulo%40disroot.org-65b4f779.rsa.pub -P ~/.abuild/'
 | 
				
			||||||
          echo "${{ secrets.REPO_PRIVKEY }}" > /home/runner/.abuild/${{ secrets.REPO_PRIVKEY_FILENAME }} && chown runner:runner /home/runner/.abuild/${{ secrets.REPO_PRIVKEY_FILENAME }}
 | 
					          echo "${{ secrets.REPO_PRIVKEY }}" > /home/runner/.abuild/${{ secrets.REPO_PRIVKEY_FILENAME }} && chown runner:runner /home/runner/.abuild/${{ secrets.REPO_PRIVKEY_FILENAME }}
 | 
				
			||||||
          su - runner -c "echo 'PACKAGER_PRIVKEY="/home/runner/.abuild/${{ secrets.REPO_PRIVKEY_FILENAME }}"' >> ~/.abuild/abuild.conf"
 | 
					          su - runner -c "echo 'PACKAGER_PRIVKEY="/home/runner/.abuild/${{ secrets.REPO_PRIVKEY_FILENAME }}"' >> ~/.abuild/abuild.conf"
 | 
				
			||||||
          echo "done"
 | 
					          echo "done""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Checkout sources
 | 
					      - name: Checkout sources
 | 
				
			||||||
        uses: actions/checkout@v4
 | 
					        uses: actions/checkout@v4
 | 
				
			||||||
| 
						 | 
					@ -58,34 +57,33 @@ jobs:
 | 
				
			||||||
          mkdir -p remote_index
 | 
					          mkdir -p remote_index
 | 
				
			||||||
          curl -sfL "${REPO_URL}/APKINDEX.tar.gz" -o remote_index/APKINDEX.tar.gz
 | 
					          curl -sfL "${REPO_URL}/APKINDEX.tar.gz" -o remote_index/APKINDEX.tar.gz
 | 
				
			||||||
          tar -xzf remote_index/APKINDEX.tar.gz -C remote_index
 | 
					          tar -xzf remote_index/APKINDEX.tar.gz -C remote_index
 | 
				
			||||||
          # Extract P: and V: fields into a list of "name-version-pkgrel"
 | 
					          awk '/^P:/ { pkg=$2 }
 | 
				
			||||||
          awk '
 | 
					 | 
				
			||||||
            /^P:/  { pkg=$2 }
 | 
					 | 
				
			||||||
               /^V:/ { ver=$2 }
 | 
					               /^V:/ { ver=$2 }
 | 
				
			||||||
            /^PR:/ { pr=$2; print pkg "-" ver "-" pr }
 | 
					               /^PR:/{ pr=$2; print pkg "-" ver "-" pr }' \
 | 
				
			||||||
          ' remote_index/APKINDEX > remote_index/list.txt
 | 
					            remote_index/APKINDEX > remote_index/list.txt
 | 
				
			||||||
          echo "::set-output name=existing::$(sort remote_index/list.txt | paste -sd, -)"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Build only missing packages
 | 
					      - name: Build only missing packages
 | 
				
			||||||
        shell: bash
 | 
					        shell: bash
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          EXISTING="$(echo "${{ steps.get_remote.outputs.existing }}" | tr ',' '\n')"
 | 
					          EXISTING_LIST=remote_index/list.txt
 | 
				
			||||||
          echo "$EXISTING"
 | 
					          mkdir -p newpkgs
 | 
				
			||||||
          mkdir -p built newpkgs
 | 
					 | 
				
			||||||
          for d in edge/*; do
 | 
					          for d in edge/*; do
 | 
				
			||||||
            cd "$d"
 | 
					            # skip non-directories
 | 
				
			||||||
            # source the APKBUILD so we get PKGNAME, PKGVER, PKGREL
 | 
					            [ -d "$d" ] || continue
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            # as runner: source APKBUILD, set ident
 | 
				
			||||||
 | 
					            sudo -u runner bash -c "
 | 
				
			||||||
 | 
					              cd '$d'
 | 
				
			||||||
              . APKBUILD
 | 
					              . APKBUILD
 | 
				
			||||||
            ident="${PKGNAME}-${PKGVER}-${PKGREL}"
 | 
					              echo \"Checking $PKGNAME-$PKGVER-$PKGREL\"
 | 
				
			||||||
            if echo "$EXISTING" | grep -qx "$ident"; then
 | 
					              if grep -F -x \"$PKGNAME-$PKGVER-$PKGREL\" ../../${EXISTING_LIST}; then
 | 
				
			||||||
              echo "Skipping $ident (already in repo)"
 | 
					                echo \" → skip, already in repo\"
 | 
				
			||||||
              else
 | 
					              else
 | 
				
			||||||
              echo "Building $ident..."
 | 
					                echo \" → building…\"
 | 
				
			||||||
                abuild -r -c
 | 
					                abuild -r -c
 | 
				
			||||||
              # collect the resulting .apk
 | 
					 | 
				
			||||||
                mv /home/runner/packages/srcpkgs/aarch64/${PKGNAME}-*.apk ../../newpkgs/ || true
 | 
					                mv /home/runner/packages/srcpkgs/aarch64/${PKGNAME}-*.apk ../../newpkgs/ || true
 | 
				
			||||||
              fi
 | 
					              fi
 | 
				
			||||||
            cd - >/dev/null
 | 
					            "
 | 
				
			||||||
          done
 | 
					          done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Sync new pkgs, clean old versions, rebuild & sign index
 | 
					      - name: Sync new pkgs, clean old versions, rebuild & sign index
 | 
				
			||||||
| 
						 | 
					@ -101,19 +99,17 @@ jobs:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          cd /home/runner/remote
 | 
					          cd /home/runner/remote
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          # For each newly-built package, remove older versions
 | 
					          # Remove old iterations of each new pkg
 | 
				
			||||||
          for pkg in /home/runner/newpkgs/*.apk; do
 | 
					          for apk in /home/runner/newpkgs/*.apk; do
 | 
				
			||||||
            base=$(basename "$pkg" | sed -E 's/(-[0-9]+\.[0-9]+.*)//')
 | 
					            base=$(basename "$apk" | sed 's/-[0-9].*//')
 | 
				
			||||||
            rm -f ${base}-*.apk || true
 | 
					            rm -f ${base}-*.apk || true
 | 
				
			||||||
          done
 | 
					          done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          # Copy over the truly new files
 | 
					          # Copy new ones in
 | 
				
			||||||
          cp /home/runner/newpkgs/*.apk .
 | 
					          cp /home/runner/newpkgs/*.apk .
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          # Rebuild the index
 | 
					          # Rebuild index and sign
 | 
				
			||||||
          apk index -o APKINDEX.tar.gz *.apk
 | 
					          apk index -o APKINDEX.tar.gz *.apk
 | 
				
			||||||
 | 
					 | 
				
			||||||
          # Sign it
 | 
					 | 
				
			||||||
          abuild-sign APKINDEX.tar.gz
 | 
					          abuild-sign APKINDEX.tar.gz
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          fusermount -u /home/runner/remote
 | 
					          fusermount -u /home/runner/remote
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue