mirror of
https://github.com/tsl0922/ttyd.git
synced 2025-12-25 21:14:21 +01:00
workflow: update actions
This commit is contained in:
10
.github/workflows/backend.yml
vendored
10
.github/workflows/backend.yml
vendored
@@ -34,7 +34,7 @@ jobs:
|
||||
cd libwebsockets-${LWS_VERSION}
|
||||
cmake -DLWS_WITH_LIBUV=ON -DLWS_UNIX_SOCK=ON -DLWS_IPV6=ON -DLWS_WITHOUT_TESTAPPS=ON -DCMAKE_BUILD_TYPE=RELEASE .
|
||||
make && sudo make install && sudo ldconfig
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build ttyd
|
||||
run: |
|
||||
cmake -DCMAKE_BUILD_TYPE=RELEASE .
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
matrix:
|
||||
target: [i686, x86_64, arm, armhf, aarch64, mips, mipsel, mips64, mips64el, s390x]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
@@ -55,14 +55,14 @@ jobs:
|
||||
env:
|
||||
BUILD_TARGET: ${{ matrix.target }}
|
||||
run: ./scripts/cross-build.sh
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ttyd.${{ matrix.target }}
|
||||
path: build/ttyd
|
||||
win10:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW64
|
||||
@@ -79,7 +79,7 @@ jobs:
|
||||
- name: Build ttyd
|
||||
shell: msys2 {0}
|
||||
run: ./scripts/mingw-build.sh
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ttyd.win10
|
||||
path: build/ttyd.exe
|
||||
|
||||
24
.github/workflows/docker.yml
vendored
24
.github/workflows/docker.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
@@ -22,9 +22,9 @@ jobs:
|
||||
[ "$arch" = "armv7" ] && arch="arm"
|
||||
mkdir -p dist/$arch && cp build/ttyd dist/$arch/ttyd
|
||||
done
|
||||
- uses: docker/setup-qemu-action@v1
|
||||
- uses: docker/setup-buildx-action@v1
|
||||
- uses: docker/login-action@v1
|
||||
- uses: docker/setup-qemu-action@v2
|
||||
- uses: docker/setup-buildx-action@v2
|
||||
- uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USER }}
|
||||
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||
@@ -34,26 +34,26 @@ jobs:
|
||||
case $GITHUB_REF in
|
||||
refs/tags/*)
|
||||
TAG_NAME=${GITHUB_REF#refs/tags/}
|
||||
echo ::set-output name=DOCKER_TAG::tsl0922/ttyd:${TAG_NAME}
|
||||
echo ::set-output name=ALPINE_TAG::tsl0922/ttyd:${TAG_NAME}-alpine
|
||||
echo "DOCKER_TAG=tsl0922/ttyd:${TAG_NAME}" >> $GITHUB_ENV
|
||||
echo "ALPINE_TAG=tsl0922/ttyd:${TAG_NAME}-alpine" >> $GITHUB_ENV
|
||||
;;
|
||||
*)
|
||||
echo ::set-output name=DOCKER_TAG::tsl0922/ttyd:latest
|
||||
echo ::set-output name=ALPINE_TAG::tsl0922/ttyd:alpine
|
||||
echo "DOCKER_TAG=tsl0922/ttyd:latest" >> $GITHUB_ENV
|
||||
echo "ALPINE_TAG=tsl0922/ttyd:alpine" >> $GITHUB_ENV
|
||||
esac
|
||||
- name: build/push docker image
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/s390x
|
||||
push: true
|
||||
tags: ${{ steps.docker_tag.outputs.DOCKER_TAG }}
|
||||
tags: ${{ env.DOCKER_TAG }}
|
||||
- name: build/push docker image (alpine)
|
||||
uses: docker/build-push-action@v2
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.alpine
|
||||
platforms: linux/amd64,linux/arm/v7,linux/arm64,linux/s390x
|
||||
push: true
|
||||
tags: ${{ steps.docker_tag.outputs.ALPINE_TAG }}
|
||||
tags: ${{ env.ALPINE_TAG }}
|
||||
|
||||
4
.github/workflows/frontend.yml
vendored
4
.github/workflows/frontend.yml
vendored
@@ -14,8 +14,8 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v1
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16.x'
|
||||
- name: Run yarn install, check and build
|
||||
|
||||
56
.github/workflows/release.yml
vendored
56
.github/workflows/release.yml
vendored
@@ -6,30 +6,13 @@ on:
|
||||
- "*"
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
steps:
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: ${{ github.ref }}
|
||||
draft: true
|
||||
prerelease: false
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: release
|
||||
strategy:
|
||||
matrix:
|
||||
target: [i686, x86_64, arm, armhf, aarch64, mips, mipsel, mips64, mips64el, s390x]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
@@ -37,22 +20,18 @@ jobs:
|
||||
- name: Cross build (${{ matrix.target }})
|
||||
env:
|
||||
BUILD_TARGET: ${{ matrix.target }}
|
||||
run: ./scripts/cross-build.sh
|
||||
- name: Upload assets
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
./scripts/cross-build.sh
|
||||
mv build/ttyd build/ttyd.${{ matrix.target }}
|
||||
- uses: ncipollo/release-action@v1
|
||||
with:
|
||||
upload_url: ${{ needs.release.outputs.upload_url }}
|
||||
asset_path: build/ttyd
|
||||
asset_name: ttyd.${{ matrix.target }}
|
||||
asset_content_type: application/octet-stream
|
||||
artifacts: build/ttyd.${{ matrix.target }}
|
||||
allowUpdates: true
|
||||
draft: true
|
||||
win10:
|
||||
runs-on: windows-latest
|
||||
needs: release
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: MINGW64
|
||||
@@ -68,14 +47,11 @@ jobs:
|
||||
update: true
|
||||
- name: Build ttyd
|
||||
shell: msys2 {0}
|
||||
run: ./scripts/mingw-build.sh
|
||||
- name: Upload assets
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
./scripts/mingw-build.sh
|
||||
mv build/ttyd.exe build/ttyd.win10.exe
|
||||
- uses: ncipollo/release-action@v1
|
||||
with:
|
||||
upload_url: ${{ needs.release.outputs.upload_url }}
|
||||
asset_path: build/ttyd.exe
|
||||
asset_name: ttyd.win10.exe
|
||||
asset_content_type: application/octet-stream
|
||||
artifacts: build/ttyd.win10.exe
|
||||
allowUpdates: true
|
||||
draft: true
|
||||
|
||||
Reference in New Issue
Block a user