mirror of https://github.com/telemt/telemt.git
Update release.yml
This commit is contained in:
parent
ec7e808daf
commit
f1cc8d65f2
|
|
@ -232,56 +232,58 @@ 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
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
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 }}
|
||||||
- name: Extract version
|
path: dist
|
||||||
id: vars
|
|
||||||
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
- name: Extract binary
|
||||||
|
|
||||||
- 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
|
||||||
- uses: docker/setup-buildx-action@v3
|
- uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- uses: docker/login-action@v3
|
- uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue