Skip to content

[Snyk] Upgrade lucide-react from 0.263.1 to 0.562.0 #98

[Snyk] Upgrade lucide-react from 0.263.1 to 0.562.0

[Snyk] Upgrade lucide-react from 0.263.1 to 0.562.0 #98

name: CI
on:
push:
branches:
- main
- develop
tags:
- 'v*'
pull_request:
branches:
- main
- develop
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Expose GitHub Actions cache for Docker
uses: crazy-max/ghaction-github-runtime@v3
- name: Create .env.test
run: |
cat > .env.test << 'EOF'
POSTGRES_USER=adsb
POSTGRES_PASSWORD=adsb
POSTGRES_DB=adsb_test
DATABASE_URL=postgresql://adsb:adsb@postgres:5432/adsb_test
REDIS_URL=redis://redis:6379/0
ULTRAFEEDER_HOST=ultrafeeder
ULTRAFEEDER_PORT=80
DUMP978_HOST=dump978
DUMP978_PORT=80
FEEDER_LAT=48.6969
FEEDER_LON=-122.6767
APPRISE_URLS=
NOTIFICATION_COOLDOWN=300
PORT=5000
POLLING_INTERVAL=2
DB_STORE_INTERVAL=5
ACARS_ENABLED=true
ACARS_PORT=5555
VDLM2_PORT=5556
OPENSKY_DB_ENABLED=false
OPENSKY_DB_PATH=/data/opensky/aircraft-database.csv
PYTHONDONTWRITEBYTECODE=1
PYTHONUNBUFFERED=1
ADSBX_API_KEY=
MOCK_ENABLED=true
MOCK_INTERVAL_MIN=1.0
MOCK_INTERVAL_MAX=2.0
STATION_ID=CI-TEST-STATION
RELAY_HOST=api
RELAY_PORT=5555
RELAY_PROTOCOL=udp
DASHBOARD_PORT=3000
API_PORT=5000
ULTRAFEEDER_PORT_EXTERNAL=8080
DUMP978_PORT_EXTERNAL=8081
ACARSHUB_WEB_PORT=8088
ACARS_UDP_PORT=5550
VDLM2_UDP_PORT=5555
HFDL_UDP_PORT=5556
IMSL_UDP_PORT=5557
IRDM_UDP_PORT=5558
ACARS_TCP_PORT=15550
VDLM2_TCP_PORT=15555
HFDL_TCP_PORT=15556
IMSL_TCP_PORT=15557
IRDM_TCP_PORT=15558
NODE_ENV=test
PHOTO_CACHE_ENABLED=false
PHOTO_CACHE_DIR=/data/photos
S3_ENABLED=false
EOF
- name: Build test images with cache
run: |
docker buildx bake -f docker-compose.test.yaml --set "*.cache-from=type=gha" --set "*.cache-to=type=gha,mode=max" --load
timeout-minutes: 10
env:
DOCKER_BUILDKIT: 1
- name: Start services
run: |
docker compose -f docker-compose.test.yaml --env-file .env.test up -d --wait postgres redis ultrafeeder dump978
timeout-minutes: 5
- name: Run tests
run: |
docker compose -f docker-compose.test.yaml --env-file .env.test --profile test run --rm api-test
timeout-minutes: 10
- name: Upload results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: test-results/
retention-days: 30
- name: Cleanup
if: always()
run: docker compose -f docker-compose.test.yaml --env-file .env.test down -v
build:
name: Build ${{ matrix.name }}
runs-on: ubuntu-latest
# needs: test
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
permissions:
contents: read
packages: write
id-token: write
attestations: write
strategy:
matrix:
include:
- name: API
dockerfile: Dockerfile
image-suffix: ""
context: .
- name: rtl-airband-uploader
dockerfile: rtl-airband-uploader/Dockerfile
image-suffix: -rtl-airband-uploader
context: rtl-airband-uploader
- name: 1090 Mock
dockerfile: test/mock-1090/Dockerfile
image-suffix: -1090-mock
context: test/mock-1090
- name: ACARS Mock
dockerfile: test/acars-mock/Dockerfile
image-suffix: -acarshub-mock
context: test/acars-mock
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Set up Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}${{ matrix.image-suffix }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,prefix={{branch}}-
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push
id: build
uses: docker/build-push-action@v5
with:
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Attest
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}${{ matrix.image-suffix }}
subject-digest: ${{ steps.build.outputs.digest }}
push-to-registry: true
- name: Summary
run: |
echo "### ${{ matrix.name }} Build Complete" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Image:** \`${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}${{ matrix.image-suffix }}\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Digest:** \`${{ steps.build.outputs.digest }}\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Tags:**" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo "${{ steps.meta.outputs.tags }}" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY