GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — socket-python-cli/.github/workflows/release.yml at main · Virtual0ps/socket-python-cli 115 lines (103 loc) · 3.86 KB / Copy pathrelease.ymlFile metadata and controls115 lines (103 loc) · 3.86 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 name: Release on: release: types: [published] jobs: release: runs-on: ubuntu-latest permissions: id-token: write contents: read steps: - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 with: fetch-depth: 0 - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 with: python-version: '3.x' # Install all dependencies from pyproject.toml - name: Install dependencies run: | python -m pip install --upgrade pip pip install hatchling==1.27.0 hatch==1.14.0 - name: Get Version id: version run: | RAW_VERSION=$(hatch version) echo "VERSION=$RAW_VERSION" >> $GITHUB_ENV if [ "v$RAW_VERSION" != "${{ github.ref_name }}" ]; then echo "Error: Git tag (${{ github.ref_name }}) does not match hatch version (v$RAW_VERSION)" exit 1 fi - name: Check if version exists on PyPI id: version_check env: VERSION: ${{ env.VERSION }} run: | if curl -s -f https://pypi.org/pypi/socketsecurity/$VERSION/json > /dev/null; then echo "Version ${VERSION} already exists on PyPI" echo "pypi_exists=true" >> $GITHUB_OUTPUT else echo "Version ${VERSION} not found on PyPI - proceeding with PyPI deployment" echo "pypi_exists=false" >> $GITHUB_OUTPUT fi - name: Check Docker image existence id: docker_check env: VERSION: ${{ env.VERSION }} run: | if curl -s -f "https://hub.docker.com/v2/repositories/socketdev/cli/tags/${{ env.VERSION }}" > /dev/null; then echo "Docker image socketdev/cli:${VERSION} already exists" echo "docker_exists=true" >> $GITHUB_OUTPUT else echo "docker_exists=false" >> $GITHUB_OUTPUT fi - name: Build package if: steps.version_check.outputs.pypi_exists != 'true' run: | pip install hatchling hatch build - name: Publish to PyPI if: steps.version_check.outputs.pypi_exists != 'true' uses: pypa/gh-action-pypi-publish@ab69e431e9c9f48a3310be0a56527c679f56e04d - name: Set up QEMU uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf - name: Set up Docker Buildx uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 - name: Login to Docker Hub with Organization Token uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Verify package is installable id: verify_package env: VERSION: ${{ env.VERSION }} run: | for i in {1..30}; do if pip install socketsecurity==${VERSION}; then echo "Package ${VERSION} is now available and installable on PyPI" pip uninstall -y socketsecurity echo "success=true" >> $GITHUB_OUTPUT exit 0 fi echo "Attempt $i: Package not yet installable, waiting 20s... (${i}/30)" sleep 20 done echo "success=false" >> $GITHUB_OUTPUT exit 1 - name: Build & Push Docker if: | steps.verify_package.outputs.success == 'true' && steps.docker_check.outputs.docker_exists != 'true' uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 env: VERSION: ${{ env.VERSION }} with: push: true platforms: linux/amd64,linux/arm64 tags: | socketdev/cli:latest socketdev/cli:${{ env.VERSION }} build-args: | CLI_VERSION=${{ env.VERSION }} |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |