Commit 914d385

Eric Bower  ·  2026-08-17 10:50:43 -0400 EDT
parent 7b5a5aa
refactor: remove github actions
5 files changed,  +0, -350
+0, -70
 1@@ -1,70 +0,0 @@
 2-name: Run a docker build
 3-
 4-description: Runs a docker build in a composite action
 5-
 6-inputs:
 7-  app:
 8-    description: The pico app to build
 9-    required: true
10-  platforms:
11-    description: The docker platforms to build for
12-    required: true
13-    default: |
14-      linux/amd64
15-      linux/arm64
16-  registry:
17-    description: The docker registry to use
18-    required: true
19-    default: ghcr.io
20-  web:
21-    description: Whether or not to build the web image
22-    required: true
23-    default: true
24-    type: boolean
25-  ssh:
26-    description: Whether or not to build the ssh image
27-    required: true
28-    default: true
29-    type: boolean
30-
31-runs:
32-  using: composite
33-  steps:
34-    - name: Collect web image metadata
35-      id: webmeta
36-      uses: docker/metadata-action@v4
37-      with:
38-        images: ${{ inputs.REGISTRY }}/${{ github.repository }}/${{ inputs.app }}-web
39-    - name: Collect ssh image metadata
40-      id: sshmeta
41-      uses: docker/metadata-action@v4
42-      with:
43-        images: ${{ inputs.REGISTRY }}/${{ github.repository }}/${{ inputs.app }}-ssh
44-    - name: Build and push web
45-      if: inputs.web == 'true'
46-      uses: docker/build-push-action@v3
47-      with:
48-        context: .
49-        push: true
50-        tags: ${{ steps.webmeta.outputs.tags }}
51-        labels: ${{ steps.webmeta.outputs.labels }}
52-        target: release-web
53-        platforms: ${{ inputs.platforms }}
54-        cache-from: type=gha
55-        cache-to: type=gha,mode=max
56-        build-args: |
57-          APP=${{ inputs.app }}
58-    - name: Build and push ssh
59-      if: inputs.ssh == 'true'
60-      uses: docker/build-push-action@v3
61-      with:
62-        context: .
63-        push: true
64-        tags: ${{ steps.sshmeta.outputs.tags }}
65-        labels: ${{ steps.sshmeta.outputs.labels }}
66-        target: release-ssh
67-        platforms: ${{ inputs.platforms }}
68-        cache-from: type=gha
69-        cache-to: type=gha,mode=max
70-        build-args: |
71-          APP=${{ inputs.app }}
+0, -34
 1@@ -1,34 +0,0 @@
 2-name: Setup main action
 3-
 4-description: Runs the setup required for docker building
 5-
 6-inputs:
 7-  registry:
 8-    description: The docker registry to use
 9-    required: true
10-    default: ghcr.io
11-  username:
12-    description: The docker registry to use
13-    required: true
14-  password:
15-    description: The docker registry to use
16-    required: true
17-
18-runs:
19-  using: composite
20-  steps:
21-    - name: Set up QEMU
22-      uses: docker/setup-qemu-action@v2
23-      with:
24-        platforms: all
25-    - name: Set up Docker Buildx
26-      id: buildx
27-      uses: docker/setup-buildx-action@v2
28-      with:
29-        version: latest
30-    - name: Login to Docker Hub
31-      uses: docker/login-action@v2
32-      with:
33-        registry: ${{ inputs.registry }}
34-        username: ${{ inputs.username }}
35-        password: ${{ inputs.password }}
+0, -20
 1@@ -1,20 +0,0 @@
 2-name: Lint and run tests
 3-
 4-description: Lints and runs tests on the codebase, used before builds and on every PR
 5-
 6-runs:
 7-  using: composite
 8-  steps:
 9-    - name: Set up Go
10-      uses: actions/setup-go@v3
11-      with:
12-        go-version: 1.26
13-    - name: Lint the codebase
14-      uses: golangci/golangci-lint-action@v8
15-      with:
16-        version: latest
17-    - name: Run tests
18-      shell: bash
19-      run: |
20-        PICO_SECRET="danger" go test -v ./... -cover -race -coverprofile=coverage.out
21-        go tool cover -func=coverage.out -o=coverage.out
+0, -211
  1@@ -1,211 +0,0 @@
  2-name: Test and Build
  3-
  4-on:
  5-  workflow_dispatch:
  6-  push:
  7-    branches:
  8-      - main
  9-    tags:
 10-      - v*
 11-
 12-env:
 13-  REGISTRY: ghcr.io
 14-  PLATFORMS: |
 15-    linux/amd64
 16-    linux/arm64
 17-
 18-jobs:
 19-  test:
 20-    runs-on: ubuntu-22.04
 21-    steps:
 22-    - name: Checkout repo
 23-      uses: actions/checkout@v3
 24-    - name: Run tests and lint
 25-      uses: ./.github/actions/test
 26-  build-main:
 27-    runs-on: ubuntu-22.04
 28-    needs: test
 29-    strategy:
 30-      matrix:
 31-        APP: [prose, pastes, pgs, feeds, pipe]
 32-    steps:
 33-    - name: Checkout repo
 34-      uses: actions/checkout@v3
 35-    - name: Setup docker
 36-      uses: ./.github/actions/setup
 37-      with:
 38-        registry: ${{ env.REGISTRY }}
 39-        username: ${{ github.actor }}
 40-        password: ${{ secrets.GITHUB_TOKEN }}
 41-    - name: Run docker build for ${{ matrix.APP }}
 42-      uses: ./.github/actions/build
 43-      with:
 44-        app: ${{ matrix.APP }}
 45-        platforms: ${{ env.PLATFORMS }}
 46-        registry: ${{ env.REGISTRY }}
 47-  build-auth:
 48-    runs-on: ubuntu-22.04
 49-    needs: test
 50-    steps:
 51-    - name: Checkout repo
 52-      uses: actions/checkout@v3
 53-    - name: Setup docker
 54-      uses: ./.github/actions/setup
 55-      with:
 56-        registry: ${{ env.REGISTRY }}
 57-        username: ${{ github.actor }}
 58-        password: ${{ secrets.GITHUB_TOKEN }}
 59-    - name: Run docker build for auth
 60-      uses: ./.github/actions/build
 61-      with:
 62-        app: auth
 63-        platforms: ${{ env.PLATFORMS }}
 64-        registry: ${{ env.REGISTRY }}
 65-        ssh: false
 66-  build-pico:
 67-    runs-on: ubuntu-22.04
 68-    needs: test
 69-    steps:
 70-    - name: Checkout repo
 71-      uses: actions/checkout@v3
 72-    - name: Setup docker
 73-      uses: ./.github/actions/setup
 74-      with:
 75-        registry: ${{ env.REGISTRY }}
 76-        username: ${{ github.actor }}
 77-        password: ${{ secrets.GITHUB_TOKEN }}
 78-    - name: Run docker build for pico
 79-      uses: ./.github/actions/build
 80-      with:
 81-        app: pico
 82-        platforms: ${{ env.PLATFORMS }}
 83-        registry: ${{ env.REGISTRY }}
 84-        web: false
 85-  build-pgs-cdn:
 86-    runs-on: ubuntu-22.04
 87-    needs: test
 88-    steps:
 89-    - name: Checkout repo
 90-      uses: actions/checkout@v3
 91-    - name: Setup docker
 92-      uses: ./.github/actions/setup
 93-      with:
 94-        registry: ${{ env.REGISTRY }}
 95-        username: ${{ github.actor }}
 96-        password: ${{ secrets.GITHUB_TOKEN }}
 97-    - name: Collect web image metadata
 98-      id: pgscdnmeta
 99-      uses: docker/metadata-action@v4
100-      with:
101-        images: ${{ env.REGISTRY }}/${{ github.repository }}/pgs-cdn
102-    - name: Build and push
103-      uses: docker/build-push-action@v3
104-      with:
105-        context: .
106-        file: Dockerfile.cdn
107-        push: true
108-        target: release-web
109-        tags: ${{ steps.pgscdnmeta.outputs.tags }}
110-        labels: ${{ steps.pgscdnmeta.outputs.labels }}
111-        platforms: ${{ env.PLATFORMS }}
112-        cache-from: type=gha
113-        cache-to: type=gha,mode=max
114-  build-pgs-standalone:
115-    runs-on: ubuntu-22.04
116-    needs: test
117-    steps:
118-    - name: Checkout repo
119-      uses: actions/checkout@v3
120-    - name: Setup docker
121-      uses: ./.github/actions/setup
122-      with:
123-        registry: ${{ env.REGISTRY }}
124-        username: ${{ github.actor }}
125-        password: ${{ secrets.GITHUB_TOKEN }}
126-    - name: Collect web image metadata
127-      id: pgsstandalonemeta
128-      uses: docker/metadata-action@v4
129-      with:
130-        images: ${{ env.REGISTRY }}/picosh/pgs
131-    - name: Build and push
132-      uses: docker/build-push-action@v3
133-      with:
134-        context: .
135-        file: Dockerfile.standalone
136-        push: true
137-        target: release
138-        tags: ${{ steps.pgsstandalonemeta.outputs.tags }}
139-        labels: ${{ steps.pgsstandalonemeta.outputs.labels }}
140-        platforms: ${{ env.PLATFORMS }}
141-        cache-from: type=gha
142-        cache-to: type=gha,mode=max
143-  build-bouncer:
144-    runs-on: ubuntu-22.04
145-    needs: test
146-    steps:
147-    - name: Checkout repo
148-      uses: actions/checkout@v3
149-    - name: Get changed files
150-      id: changed-files
151-      uses: tj-actions/changed-files@v40
152-      with:
153-        files: bouncer/**
154-    - name: Setup docker
155-      if: steps.changed-files.outputs.any_changed == 'true'
156-      uses: ./.github/actions/setup
157-      with:
158-        registry: ${{ env.REGISTRY }}
159-        username: ${{ github.actor }}
160-        password: ${{ secrets.GITHUB_TOKEN }}
161-    - name: Collect bouncer image metadata
162-      if: steps.changed-files.outputs.any_changed == 'true'
163-      id: bouncermeta
164-      uses: docker/metadata-action@v4
165-      with:
166-        images: ${{ env.REGISTRY }}/${{ github.repository }}/bouncer
167-    - name: Build and push
168-      if: steps.changed-files.outputs.any_changed == 'true'
169-      uses: docker/build-push-action@v3
170-      with:
171-        context: ./bouncer
172-        push: true
173-        tags: ${{ steps.bouncermeta.outputs.tags }}
174-        labels: ${{ steps.bouncermeta.outputs.labels }}
175-        platforms: ${{ env.PLATFORMS }}
176-        cache-from: type=gha
177-        cache-to: type=gha,mode=max
178-  build-caddy:
179-    runs-on: ubuntu-22.04
180-    needs: test
181-    steps:
182-    - name: Checkout repo
183-      uses: actions/checkout@v3
184-    - name: Get changed files
185-      id: changed-files
186-      uses: tj-actions/changed-files@v40
187-      with:
188-        files: caddy/**
189-    - name: Setup docker
190-      if: steps.changed-files.outputs.any_changed == 'true'
191-      uses: ./.github/actions/setup
192-      with:
193-        registry: ${{ env.REGISTRY }}
194-        username: ${{ github.actor }}
195-        password: ${{ secrets.GITHUB_TOKEN }}
196-    - name: Collect caddy image metadata
197-      if: steps.changed-files.outputs.any_changed == 'true'
198-      id: caddymeta
199-      uses: docker/metadata-action@v4
200-      with:
201-        images: ${{ env.REGISTRY }}/${{ github.repository }}/caddy
202-    - name: Build and push
203-      if: steps.changed-files.outputs.any_changed == 'true'
204-      uses: docker/build-push-action@v3
205-      with:
206-        context: ./caddy
207-        push: true
208-        tags: ${{ steps.caddymeta.outputs.tags }}
209-        labels: ${{ steps.caddymeta.outputs.labels }}
210-        platforms: ${{ env.PLATFORMS }}
211-        cache-from: type=gha
212-        cache-to: type=gha,mode=max
+0, -15
 1@@ -1,15 +0,0 @@
 2-name: Test PRs
 3-
 4-on:
 5-  pull_request:
 6-    branches:
 7-      - main
 8-
 9-jobs:
10-  test:
11-    runs-on: ubuntu-22.04
12-    steps:
13-    - name: Checkout repo
14-      uses: actions/checkout@v3
15-    - name: Run tests and lint
16-      uses: ./.github/actions/test