Update dependency laravel/framework to v12.49.0 #6113
This file contains hidden or 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: backend | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - "backend/**" | |
| - ".github/workflows/backend.yml" | |
| jobs: | |
| backend: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.5" | |
| extensions: mongodb-2.1.2 | |
| - run: docker compose up -d database | |
| working-directory: backend | |
| - run: composer install -n --prefer-dist | |
| working-directory: backend | |
| - run: php artisan test | |
| working-directory: backend | |
| env: | |
| INTERN_GOOGLE_API_KEY: ${{ secrets.INTERN_GOOGLE_API_KEY }} | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build container | |
| id: docker_build | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: backend | |
| push: ${{ github.ref == 'refs/heads/main' }} | |
| tags: ghcr.io/blindern/intern-backend:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Deploy | |
| if: github.ref == 'refs/heads/main' | |
| run: | | |
| curl --fail -L -i -H "authorization: bearer $DEPLOYER_TOKEN" -H "content-type: application/json" -X POST https://deployer.foreningenbs.no/deploy -d ' | |
| { | |
| "service": "intern", | |
| "attributes": { | |
| "backend_image": "ghcr.io/blindern/intern-backend@${{ steps.docker_build.outputs.digest }}" | |
| } | |
| }' | |
| env: | |
| DEPLOYER_TOKEN: ${{ secrets.DEPLOYER_TOKEN }} |