test, pls ignore #30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Get Egress IP Address | |
| id: get_ip | |
| run: | | |
| # Use a service to get the public IP of the runner | |
| EGRESS_IP=$(curl -s https://icanhazip.com) | |
| echo "Egress IP: $EGRESS_IP" | |
| # Set the IP as a step output | |
| echo "ip=$EGRESS_IP" >> $GITHUB_OUTPUT | |
| - name: Use Egress IP to Guess Region | |
| if: steps.get_ip.outputs.ip != '' | |
| id: get_location | |
| run: | | |
| IP_TO_CHECK="${{ steps.get_ip.outputs.ip }}" | |
| echo "Checking IP: $IP_TO_CHECK" | |
| # Use a service to get the location of the IP | |
| # You can use a dedicated service or a cloud provider's public IP list | |
| # Example with an external API (for demonstration) | |
| # Note: This is an external API call and may be rate-limited | |
| LOCATION_INFO=$(curl -s "https://ipinfo.io/$IP_TO_CHECK/json") | |
| CITY=$(echo "$LOCATION_INFO" | jq -r '.city') | |
| REGION=$(echo "$LOCATION_INFO" | jq -r '.region') | |
| COUNTRY=$(echo "$LOCATION_INFO" | jq -r '.country') | |
| ORG=$(echo "$LOCATION_INFO" | jq -r '.org') | |
| echo "Location Info: $CITY, $REGION, $COUNTRY" | |
| echo "Organization: $ORG" | |
| - name: direct test | |
| shell: bash | |
| run: | | |
| mkdir test | |
| cd test | |
| curl https://storage.googleapis.com/splice-nix-cache-public/48461acabd81ff985f7de6e4a32efb29.tar.gz -o b.tar.gz | |
| - name: test zstd | |
| shell: bash | |
| run: | | |
| cd test | |
| ls -l b.tar.gz | |
| echo "Extracting b.tar.gz" | |
| tar -xzf b.tar.gz | |
| echo "Done extracting b.tar.gz" | |
| rm b.tar.gz | |
| echo "Creating a.tar.zst" | |
| tar -I zstd -cf a.tar.zst * | |
| echo "Done creating a.tar.zst" | |
| ls -l a.tar.zst | |
| mkdir ../temp2 | |
| mv a.tar.zst ../temp2/ | |
| cd .. | |
| rm -rf test | |
| cd temp2 | |
| echo "Extracting a.tar.zst" | |
| tar -I zstd -xf a.tar.zst | |
| echo "Done extracting a.tar.zst" | |
| ls -l |