Update release.yml

This commit is contained in:
Alexey 2026-03-24 11:12:03 +03:00 committed by GitHub
parent ec7e808daf
commit f1cc8d65f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 31 additions and 29 deletions

View File

@ -232,12 +232,21 @@ jobs:
prerelease: ${{ contains(github.ref, '-') }} prerelease: ${{ contains(github.ref, '-') }}
# ========================== # ==========================
# Docker (FROM RELEASE) # Docker
# ========================== # ==========================
docker: docker:
name: Docker (from release) name: Docker (${{ matrix.platform }})
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: release needs: [build-gnu, build-musl]
strategy:
fail-fast: false
matrix:
include:
- platform: linux/amd64
artifact: telemt-x86_64-linux-musl
- platform: linux/arm64
artifact: telemt-aarch64-linux-musl
permissions: permissions:
contents: read contents: read
@ -246,25 +255,14 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Install gh - uses: actions/download-artifact@v4
run: apt-get update && apt-get install -y gh with:
name: ${{ matrix.artifact }}
path: dist
- name: Extract version - name: Extract binary
id: vars
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Download binary
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: | run: |
mkdir dist tar -xzf dist/${{ matrix.artifact }}.tar.gz -C dist
gh release download ${{ steps.vars.outputs.VERSION }} \
--repo ${{ github.repository }} \
--pattern "telemt-x86_64-linux-musl.tar.gz" \
--dir dist
tar -xzf dist/telemt-x86_64-linux-musl.tar.gz -C dist
chmod +x dist/telemt chmod +x dist/telemt
- uses: docker/setup-qemu-action@v3 - uses: docker/setup-qemu-action@v3
@ -276,12 +274,16 @@ jobs:
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & Push - name: Extract version
id: vars
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Build & Push (per arch)
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
context: . context: .
push: true push: true
platforms: linux/amd64,linux/arm64 platforms: ${{ matrix.platform }}
tags: | tags: |
ghcr.io/${{ github.repository }}:${{ steps.vars.outputs.VERSION }} ghcr.io/${{ github.repository }}:${{ steps.vars.outputs.VERSION }}
ghcr.io/${{ github.repository }}:latest ghcr.io/${{ github.repository }}:latest