Skip to content

try copy file from /usr/bin/lvscare or /root/lvscare #31

try copy file from /usr/bin/lvscare or /root/lvscare

try copy file from /usr/bin/lvscare or /root/lvscare #31

Workflow file for this run

name: build and release
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
-
name: Inspect builder
run: |
echo "Name: ${{ steps.buildx.outputs.name }}"
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}"
echo "Status: ${{ steps.buildx.outputs.status }}"
echo "Flags: ${{ steps.buildx.outputs.flags }}"
echo "Platforms: ${{ steps.buildx.outputs.platforms }}"
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Test version
run: |
echo ${{ steps.get_version.outputs.VERSION }}
echo ${{ github.ref }}
# - uses: actions/setup-go@v3
# with:
# go-version: '1.19.1'
# - name: Get gopath
# id: get_gopath
# run: echo ::set-output name=GOPATH::$(go env GOPATH)
# - run: go env
# - run: go version
- name: Build lvscare binary
shell: bash
run: |
#linux/arm64
mkdir -p /tmp/amd64
mkdir -p /tmp/arm64
docker run -i --rm --entrypoint="" -v /tmp/amd64:/tmp ghcr.io/labring/lvscare:${{ steps.get_version.outputs.VERSION }} sh -c "cp /root/lvscare /tmp 2>/dev/null || cp /usr/bin/lvscare /tmp 2>/dev/null || true"
docker run -i --rm --entrypoint="" -v /tmp/arm64:/tmp --platform linux/arm64 ghcr.io/labring/lvscare:${{ steps.get_version.outputs.VERSION }} sh -c "cp /root/lvscare /tmp 2>/dev/null || cp /usr/bin/lvscare /tmp 2>/dev/null || true"
# buildkit-v0.10.4.linux-amd64.tar.gz
pushd /tmp/amd64 &>/dev/null
tar -cvJf /tmp/lvscare-${{ steps.get_version.outputs.VERSION }}.linux-amd64.tar.xz lvscare
tar -cvzf /tmp/lvscare-${{ steps.get_version.outputs.VERSION }}.linux-amd64.tar.gz lvscare
popd &>/dev/null
pushd /tmp/arm64 &>/dev/null
tar -cvJf /tmp/lvscare-${{ steps.get_version.outputs.VERSION }}.linux-arm64.tar.xz lvscare
tar -cvzf /tmp/lvscare-${{ steps.get_version.outputs.VERSION }}.linux-arm64.tar.gz lvscare
popd &>/dev/null
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body: "Release lvscare ${{ steps.get_version.outputs.VERSION }}. \n source: https://github.com/labring/lvscare/pkgs/container/lvscare"
files: |
/tmp/lvscare-${{ steps.get_version.outputs.VERSION }}.linux-arm64.tar.xz
/tmp/lvscare-${{ steps.get_version.outputs.VERSION }}.linux-arm64.tar.gz
/tmp/lvscare-${{ steps.get_version.outputs.VERSION }}.linux-amd64.tar.xz
/tmp/lvscare-${{ steps.get_version.outputs.VERSION }}.linux-amd64.tar.gz