[MIRROR ONLY] A correct and efficient ATProto blob proxy for secure content delivery. codeberg.org/Blooym/porxie
36
fork

Configure Feed

Select the types of activity you want to include in your feed.

ci: use docker provided gh workflow

Lyna a9c14a6d 80ce3462

+22 -124
+22 -124
.github/workflows/release.yml
··· 1 - name: "Release" 2 - run-name: "Release ${{ github.ref_name }}" 3 - on: 4 - push: 5 - tags: 6 - - "v*.*.*" 1 + name: "Publish to DockerHub" 7 2 8 3 concurrency: 9 4 group: ${{ github.repository }}-${{github.ref_name}} 10 5 cancel-in-progress: true 11 6 12 - env: 13 - REGISTRY: ghcr.io 14 - IMAGE_NAME: ${{ github.repository }} 7 + on: 8 + push: 9 + tags: 10 + - "v*" 15 11 16 12 jobs: 17 13 build: 18 - name: "Build Image (${{ matrix.platform }})" 19 - runs-on: ${{ matrix.runner }} 20 - permissions: 21 - contents: read 22 - packages: write 23 - strategy: 24 - fail-fast: false 25 - matrix: 26 - include: 27 - - platform: linux/amd64 28 - runner: ubuntu-24.04 29 - - platform: linux/arm64 30 - runner: ubuntu-24.04-arm 31 - steps: 32 - - name: Prepare 33 - run: | 34 - platform=${{ matrix.platform }} 35 - echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV 36 - echo "IMAGE_NAME=$(echo '${{ env.IMAGE_NAME }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV 37 - 38 - - name: Checkout Repository 39 - uses: actions/checkout@v6 40 - 41 - - name: Set up Docker Buildx 42 - uses: docker/setup-buildx-action@v3 43 - 44 - - name: Log in to the Container Registry 45 - uses: docker/login-action@v3 46 - with: 47 - registry: ${{ env.REGISTRY }} 48 - username: ${{ github.actor }} 49 - password: ${{ secrets.GITHUB_TOKEN }} 50 - 51 - - name: Extract Metadata 52 - id: meta 53 - uses: docker/metadata-action@v5 54 - with: 55 - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 56 - github-token: ${{ secrets.GITHUB_TOKEN }} 57 - 58 - - name: Build & Push by Digest 59 - id: build 60 - uses: docker/build-push-action@v6 61 - with: 62 - context: . 63 - file: ./Dockerfile 64 - platforms: ${{ matrix.platform }} 65 - labels: ${{ steps.meta.outputs.labels }} 66 - outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true 67 - cache-from: type=gha 68 - cache-to: type=gha,mode=max 69 - github-token: ${{ secrets.GITHUB_TOKEN }} 70 - 71 - - name: Export Digest 72 - run: | 73 - mkdir -p ${{ runner.temp }}/digests 74 - digest="${{ steps.build.outputs.digest }}" 75 - touch "${{ runner.temp }}/digests/${digest#sha256:}" 76 - 77 - - name: Upload Digest 78 - uses: actions/upload-artifact@v4 79 - with: 80 - name: digests-${{ env.PLATFORM_PAIR }} 81 - path: ${{ runner.temp }}/digests/* 82 - if-no-files-found: error 83 - retention-days: 1 84 - 85 - merge: 86 - name: "Merge & Publish Manifest" 87 - runs-on: ubuntu-latest 88 - needs: build 14 + uses: docker/github-builder/.github/workflows/build.yml@v1 89 15 permissions: 90 16 contents: read 91 - packages: write 92 - steps: 93 - - name: Prepare 94 - run: | 95 - echo "IMAGE_NAME=$(echo '${{ env.IMAGE_NAME }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV 96 - 97 - - name: Download Digests 98 - uses: actions/download-artifact@v4 99 - with: 100 - path: ${{ runner.temp }}/digests 101 - pattern: digests-* 102 - merge-multiple: true 103 - 104 - - name: Set up Docker Buildx 105 - uses: docker/setup-buildx-action@v3 106 - 107 - - name: Log in to the Container Registry 108 - uses: docker/login-action@v3 109 - with: 110 - registry: ${{ env.REGISTRY }} 111 - username: ${{ github.actor }} 112 - password: ${{ secrets.GITHUB_TOKEN }} 113 - 114 - - name: Extract Metadata 115 - id: meta 116 - uses: docker/metadata-action@v5 117 - with: 118 - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 119 - github-token: ${{ secrets.GITHUB_TOKEN }} 120 - tags: | 121 - type=semver,pattern={{version}} 122 - type=semver,pattern={{major}}.{{minor}} 123 - type=raw,value=latest,enable=${{ !contains(github.ref_name, '-') }} 124 - 125 - - name: Create & Push Manifest 126 - working-directory: ${{ runner.temp }}/digests 127 - run: | 128 - docker buildx imagetools create \ 129 - $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ 130 - $(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *) 131 - 132 - - name: Inspect Image 133 - run: | 134 - docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }} 17 + id-token: write 18 + with: 19 + output: image 20 + platforms: linux/amd64,linux/arm64 21 + distribute: true 22 + meta-images: ${{ vars.DOCKERHUB_USERNAME }}/porxie 23 + push: true 24 + meta-tags: | 25 + type=semver,pattern={{version}} 26 + type=semver,pattern={{major}}.{{minor}} 27 + type=raw,value=latest,enable=${{ !contains(github.ref_name, '-') }} 28 + secrets: 29 + registry-auths: | 30 + - registry: docker.io 31 + username: ${{ vars.DOCKERHUB_USERNAME }} 32 + password: ${{ secrets.DOCKERHUB_TOKEN }}