fix: auth cookie domain #90
Workflow file for this run
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
on: | |
push: | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+-dev.[0-9]+' | |
jobs: | |
install-dependencies: | |
name: Install Dependencies | |
runs-on: ubuntu-latest | |
environment: develop | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
cache-dependency-path: yarn.lock | |
- name: Restore Dependencies Cache | |
uses: actions/cache/restore@v4 | |
id: cache-restore | |
with: | |
path: | | |
node_modules | |
.husky | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Install Dependencies | |
run: yarn --frozen-lockfile --no-progress --non-interactive | |
if: steps.cache-restore.outputs.cache-hit != 'true' | |
- name: Save Dependencies Cache | |
uses: actions/cache/save@v4 | |
if: steps.cache-restore.outputs.cache-hit != 'true' | |
id: cache-save | |
with: | |
path: | | |
node_modules | |
.husky | |
key: ${{ steps.cache-restore.outputs.cache-primary-key }} | |
test: | |
name: Run Test | |
runs-on: ubuntu-latest | |
needs: [install-dependencies] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
cache-dependency-path: yarn.lock | |
- name: Restore Dependencies Cache | |
uses: actions/cache/restore@v4 | |
id: cache-restore-yarn | |
with: | |
path: | | |
node_modules | |
.husky | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Restore Tests Cache | |
uses: actions/cache/restore@v4 | |
id: cache-restore-jest | |
with: | |
path: .jestcache | |
key: ${{ runner.os }}-jest-${{ hashFiles('**/yarn.lock') }} | |
- name: Running tests | |
env: | |
TZ: 'America/Sao_Paulo' | |
run: yarn test --cacheDirectory ".jestcache" | |
- name: Save Tests Cache | |
uses: actions/cache/save@v4 | |
id: cache-save | |
with: | |
path: .jestcache | |
key: ${{ steps.cache-restore-jest.outputs.cache-primary-key }} | |
build: | |
name: Build image | |
runs-on: ubuntu-latest | |
needs: [test] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ steps.latestrelease.outputs.releasetag }} | |
- name: Setup NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
cache-dependency-path: yarn.lock | |
- name: Restore Dependencies Cache | |
uses: actions/cache/restore@v4 | |
id: cache-restore | |
with: | |
path: | | |
node_modules | |
.husky | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Build | |
run: yarn build | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Get the tag name | |
run: | | |
echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME" | |
echo "Tag name from github.ref_name: ${{ github.ref_name }}" | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
file: ./Dockerfile | |
push: true | |
tags: konecty/konecty:${{ github.ref_name }} | |
build-args: | | |
VERSION=${{ github.ref_name }} |