Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: set test github action #1

Merged
merged 1 commit into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,26 @@ env:
DOCKER_BUILDKIT: 1

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 18 ]
name: Run tests on Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn test:ci

images:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.repository == 'aulasoftwarelibre/codex' && (startsWith(github.ref, 'refs/heads/releases/') || startsWith(github.ref, 'refs/tags/v') )
needs: tests
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
Expand All @@ -37,15 +54,15 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract tag name
id: extract_tag
run: echo "::set-output name=tag::$(echo ${GITHUB_REF##*/})"
run: echo "TAG=$(echo ${GITHUB_REF##*/})" >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
ghcr.io/aulasoftwarelibre/codex:latest
ghcr.io/aulasoftwarelibre/codex:${{ steps.extract_tag.outputs.tag }}
ghcr.io/aulasoftwarelibre/codex:${{ steps.extract_tag.outputs.TAG }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: Move cache
Expand Down
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const nextConfig = {
}] : [],
],
},
output: 'standalone'
}

module.exports = nextConfig
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"prisma:generate": "prisma generate"
},
"dependencies": {
"@aulasoftwarelibre/next-auth-firewall": "^1.0.2",
"@aulasoftwarelibre/next-auth-firewall": "^1.1.0",
"@auth/prisma-adapter": "^1.0.14",
"@heroicons/react": "^2.1.1",
"@nextui-org/react": "2.2.9",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
css-tree "^2.3.1"
is-potential-custom-element-name "^1.0.1"

"@aulasoftwarelibre/next-auth-firewall@^1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@aulasoftwarelibre/next-auth-firewall/-/next-auth-firewall-1.0.2.tgz#841b4242aedee93419c3a815ab28136f5e6da7bb"
integrity sha512-Za6A7Vn6JIdL64NvFm+suByIEjlD5pvP34DTiA4nk8VS13DHvKFwV4lb2mPieL2AQDE//gs9MjIMqxOlHBsy8Q==
"@aulasoftwarelibre/next-auth-firewall@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@aulasoftwarelibre/next-auth-firewall/-/next-auth-firewall-1.1.0.tgz#fe9552c14b77118a3e9df280c4b694ceb0b62273"
integrity sha512-zvqTCiSdDELD4hUpTbTNqNCwbxwa9ChE+hCr2RwRONa7P09146JyobdQ9WxpUiQorWA4HwF3F+C3EPfvTRSmUQ==
dependencies:
"@auth/core" experimental
next "^14.0.0"
Expand Down