Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
varbhat committed Aug 25, 2021
0 parents commit 4727f22
Show file tree
Hide file tree
Showing 82 changed files with 13,958 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ko_fi: varbhat
liberapay: varbhat
custom: "https://www.paypal.me/varbhat"
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "npm"
directory: "/internal/web"
schedule:
interval: "daily"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build exatorrent

on:
push:
tags:
- v*

jobs:
build:
if: ${{ github.owner }} == "varbhat"
runs-on: ubuntu-latest

container:
image: "ghcr.io/varbhat/void-container:glibc"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Prepare container
run: |
xbps-install -Syu || xbps-install -yu xbps
xbps-install -yu
- name: Install Packages
run: xbps-install -Sy git curl bash make go nodejs cross-x86_64-linux-musl cross-aarch64-linux-musl github-cli
- name: Checkout repository
uses: actions/checkout@v2
- name: Build exatorrent
run: go mod tidy && make web && make app-linux-amd64 && make app-linux-arm64 && make checksum
- name: Publish Releases
run: |
gh config set prompt disabled
gh release create $(git tag -l | tail -n1) -t $(git tag -l | tail -n1) -p build/*
45 changes: 45 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Create and publish Container Images

on:
push:
tags:
- v*

jobs:
build-container-images:
if: ${{ github.owner }} == "varbhat"
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup QEMU
uses: docker/setup-qemu-action@v1

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build the amd64 image
run: docker buildx build --load --platform "linux/amd64" . --tag ghcr.io/varbhat/exatorrent:amd64

- name: Build the arm64 image
run: docker buildx build --load --platform "linux/arm64" . --tag ghcr.io/varbhat/exatorrent:arm64

- name: Push Images
run: docker push ghcr.io/varbhat/exatorrent -a

- name: Create and Push Manifest
run: |
docker manifest create ghcr.io/varbhat/exatorrent:latest ghcr.io/varbhat/exatorrent:amd64 ghcr.io/varbhat/exatorrent:arm64
docker manifest push ghcr.io/varbhat/exatorrent:latest
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM ghcr.io/varbhat/void-container:musl AS build
RUN xbps-install -Syu || xbps-install -yu xbps
RUN xbps-install -yu
RUN xbps-install -Sy git curl bash make go nodejs gcc
WORKDIR /exa
ADD . /exa
RUN go mod tidy && make web && make app

FROM gcr.io/distroless/base
COPY --from=build --chown=1000:1000 /exa/build/exatorrent /exatorrent
USER 1000:1000
WORKDIR /exa
ENTRYPOINT ["/exatorrent"]
Loading

0 comments on commit 4727f22

Please sign in to comment.