Skip to content

Commit

Permalink
chore: set test github action
Browse files Browse the repository at this point in the history
  • Loading branch information
sgomez committed Jan 14, 2024
1 parent a422c05 commit 2da404e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
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: Node ${{ matrix.node }} sample
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

0 comments on commit 2da404e

Please sign in to comment.