detached 932fd9f

Update Dockerfile and add GitHub Actions workflow

- Fix run cmd
- Fix incorrect image name after build
commit
932fd9fd08016fc92b8b57abf13d4442013b466c
author
bamen · · 2024-08-26 18:00 UTC
committer
bamen · · 2024-08-26 17:52 UTC
parent
61f0463
signature
unsigned
2 files · +47 -5
A .github/workflows/build_dev.yml +39 -0
@@ -0,0 +1,39 @@
1+name: Build and Test Gordon
2+
3+on:
4+ push:
5+ branches:
6+ - "dev"
7+
8+jobs:
9+ build-and-test:
10+ name: Build and Test
11+ runs-on: ubuntu-latest
12+ permissions:
13+ contents: read
14+ packages: write
15+ env:
16+ KO_DOCKER_REPO: ghcr.io/${{ github.repository }}
17+
18+ steps:
19+ - uses: actions/setup-go@v4
20+ with:
21+ go-version: "1.23"
22+
23+ - uses: actions/checkout@v3
24+
25+ # - name: Run tests
26+ # run: go test ./...
27+
28+ - name: Log in to GitHub Container Registry
29+ uses: docker/login-action@v2
30+ with:
31+ registry: ghcr.io
32+ username: ${{ github.actor }}
33+ password: ${{ secrets.GITHUB_TOKEN }}
34+
35+ - uses: ko-build/setup-ko@v0.6
36+
37+ - name: Build and push with ko
38+ run: |
39+ ko build --platform=linux/amd64,linux/arm64 --bare --tags=dev -B ./cmd/cli --base-import-paths=false --image-refs=gordon-dev
@@ -0,0 +1,39 @@
1+name: Build and Test Gordon
2+
3+on:
4+ push:
5+ branches:
6+ - "dev"
7+
8+jobs:
9+ build-and-test:
10+ name: Build and Test
11+ runs-on: ubuntu-latest
12+ permissions:
13+ contents: read
14+ packages: write
15+ env:
16+ KO_DOCKER_REPO: ghcr.io/${{ github.repository }}
17+
18+ steps:
19+ - uses: actions/setup-go@v4
20+ with:
21+ go-version: "1.23"
22+
23+ - uses: actions/checkout@v3
24+
25+ # - name: Run tests
26+ # run: go test ./...
27+
28+ - name: Log in to GitHub Container Registry
29+ uses: docker/login-action@v2
30+ with:
31+ registry: ghcr.io
32+ username: ${{ github.actor }}
33+ password: ${{ secrets.GITHUB_TOKEN }}
34+
35+ - uses: ko-build/setup-ko@v0.6
36+
37+ - name: Build and push with ko
38+ run: |
39+ ko build --platform=linux/amd64,linux/arm64 --bare --tags=dev -B ./cmd/cli --base-import-paths=false --image-refs=gordon-dev
M Dockerfile +8 -5
@@ -1,9 +1,12 @@
1-# Use a small base image
1+# Use a minimal base image
22 FROM alpine
3-ARG BINARY
3+# Install ca-certificates bundle
4+RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
5+# Copy the binary
6+COPY gordon /gordon
7+# Copy other necessary files
48 COPY .iscontainer /
5-COPY gordon /
9+# Set the entrypoint
610 ENTRYPOINT ["/gordon"]
7-
8-# Default command when running the container
11+# Default command
912 CMD ["serve"]
@@ -1,9 +1,12 @@
1-# Use a small base image1+# Use a minimal base image
2 FROM alpine2 FROM alpine
3-ARG BINARY3+# Install ca-certificates bundle
4+RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*
5+# Copy the binary
6+COPY gordon /gordon
7+# Copy other necessary files
4 COPY .iscontainer /8 COPY .iscontainer /
5-COPY gordon /9+# Set the entrypoint
6 ENTRYPOINT ["/gordon"]10 ENTRYPOINT ["/gordon"]
7-11+# Default command
8-# Default command when running the container
9 CMD ["serve"]12 CMD ["serve"]

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close