chore(deps): bump github/codeql-action from 3.27.5 to 3.28.9 #2155
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: read-all | |
env: | |
TEST_TAG: user/app:test | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Setup bun | |
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2 | |
with: | |
bun-version: 1.1.16 | |
- name: Setup go | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: 1.22.2 | |
- name: Setup bun cache | |
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
id: bun-cache | |
with: | |
path: | | |
./node_modules | |
key: ${{ runner.os }}-bun-${{ hashFiles('./bun.lockb') }} | |
- name: bun install | |
if: steps.bun-cache.outputs.cache-hit != 'true' | |
run: | | |
bun i | |
- name: Setup generate cache | |
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
id: generate-cache | |
with: | |
path: | | |
./public/style.css | |
./internal/web/template/**/*_templ.go | |
key: ${{ runner.os }}-generate-${{ hashFiles('./internal/**/template/**/*.templ') }} | |
- name: Generate | |
if: steps.generate-cache.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p bin/ | |
go install github.com/a-h/templ/cmd/templ@v0.2.663 | |
templ generate | |
./node_modules/.bin/tailwindcss -i ./style.css -o ./public/style.css | |
test: | |
needs: [setup] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Setup go | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: 1.22.2 | |
- name: Restore generate cache | |
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
with: | |
path: | | |
./public/style.css | |
./internal/web/template/**/*_templ.go | |
key: ${{ runner.os }}-generate-${{ hashFiles('./internal/**/template/**/*.templ') }} | |
- name: Test | |
run: | | |
go test -v ./... | |
build: | |
needs: [setup] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Setup go | |
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version: 1.22.2 | |
- name: Restore generate cache | |
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | |
with: | |
path: | | |
./public/style.css | |
./internal/web/template/**/*_templ.go | |
key: ${{ runner.os }}-generate-${{ hashFiles('./internal/**/template/**/*.templ') }} | |
- name: Dry Build Web | |
run: | | |
go build -o ./tmp/main ./cmd/web/main.go | |
- name: Dry Build API | |
run: | | |
go build -o ./tmp/api ./cmd/api/main.go | |
docker: | |
needs: [test, setup, build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Set up Docker buildx | |
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1 | |
- name: Dry Build Web | |
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 | |
with: | |
context: . | |
load: true | |
file: ./Dockerfile | |
tags: ${{ env.TEST_TAG }} | |
- name: Dry Build API | |
uses: docker/build-push-action@16ebe778df0e7752d2cfcbd924afdbbd89c1a755 # v6.6.1 | |
with: | |
context: . | |
load: true | |
file: ./api.dockerfile | |
tags: ${{ env.TEST_TAG }} |