fix(deps): update all non-major dependencies #120
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: Release to staging | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- uses: docker/setup-buildx-action@v3 | |
- name: Build image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: false | |
load: true | |
tags: jami:latest | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
env: | |
DOCKER_BUILD_SUMMARY: false | |
- name: Start the application | |
run: docker compose -f docker-compose.ci.yml up -d | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
run: echo "Waiting 6 seconds before starting..." && sleep 6 && npm test | |
- name: Output application logs on failure | |
if: failure() | |
run: docker compose -f docker-compose.ci.yml logs -t --tail=100 | |
build-and-push: | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.event_name == 'push' # Prevent this job from running on pull requests | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build image | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: jami | |
tags: staging ${{ github.sha }} | |
containerfiles: | | |
./Dockerfile | |
build-args: | | |
NODE_ENV=staging | |
- name: Push to quay.io | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build-image.outputs.image }} | |
tags: ${{ steps.build-image.outputs.tags }} | |
registry: quay.io/toska | |
username: toska+github | |
password: ${{ secrets.QUAY_IO_TOKEN }} |