Fix actions

This commit is contained in:
Soren Hansen
2025-08-02 13:54:00 -07:00
parent 32a7301d05
commit 72da0060b9
5 changed files with 15 additions and 4 deletions

View File

@@ -15,9 +15,11 @@ jobs:
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 22
- run: "make clean"
- run: "make assets"
- name: "Make sure gotty.js bundle is up-to-date"
@@ -34,11 +36,14 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: "Build & test"
run: "make tools test cross_compile"
- name: Upload artifacts
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
name: binaries

View File

@@ -30,6 +30,7 @@ jobs:
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
if: ${{ !env.ACT }}
with:
username: "${{ secrets.DOCKER_HUB_USER }}"
password: "${{ secrets.DOCKER_HUB_TOKEN }}"
@@ -37,6 +38,6 @@ jobs:
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
push: ${{ !env.ACT }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@@ -17,11 +17,14 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: "Build"
run: "touch bindata/* bindata/*/* ; make"
- name: Upload linux/amd64 artifact
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
name: gotty-linux-amd64

View File

@@ -18,6 +18,8 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: "Build & test"
run: "make tools test release-artifacts"

View File

@@ -1,10 +1,10 @@
FROM node:16 as js-build
FROM node:22 as js-build
WORKDIR /gotty
COPY js /gotty/js
COPY Makefile /gotty/
RUN make bindata/static/js/gotty.js.map
FROM golang:1.20 as go-build
FROM golang:1.23 as go-build
WORKDIR /gotty
COPY . /gotty
COPY --from=js-build /gotty/js/node_modules /gotty/js/node_modules