eFormidling - mottak #7572
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: eFormidling - mottak | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| # Tidspunktene er i GMT | |
| - cron: "15 5-20 * * 1-5" | |
| - cron: "24 */6 * * 0,6" | |
| jobs: | |
| mottak: | |
| runs-on: | |
| group: permanent-runners | |
| concurrency: | |
| group: eformidling-mottak | |
| cancel-in-progress: true | |
| environment: | |
| name: production | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Sett opp .env | |
| run: | | |
| echo "${{ vars.LARAVEL_ENV }}" > .env | |
| cat <<EOF >> .env | |
| # Innstillinger basert på Environment/Repository | |
| AZURE_SP_ID=${{ vars.AZURE_SP_ID }} | |
| AZURE_TENANT_ID=${{ vars.AZURE_TENANT_ID }} | |
| MICROSOFT_GRAPH_CLIENT_ID=${{ vars.MICROSOFT_GRAPH_CLIENT_ID }} | |
| PURESERVICE_URL=${{ vars.PURESERVICE_URL }} | |
| JAMFPRO_URL=${{ vars.JAMFPRO_URL }} | |
| JAMFPRO_CLIENTID=${{ vars.JAMFPRO_CLIENTID }} | |
| REDIS_HOST=${{ vars.REDIS_HOST }} | |
| CACHE_DRIVER=${{ vars.CACHE_DRIVER }} | |
| MAIL_MAILER=${{ vars.MAIL_MAILER }} | |
| MAIL_HOST=${{ vars.MAIL_HOST }} | |
| MAIL_USER=${{ vars.MAIL_USER }} | |
| APP_DEBUG=${{ vars.APP_DEBUG }} | |
| EOF | |
| - name: Cache dependencies | |
| id: vendor-cache | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-vendor-files | |
| with: | |
| path: ./vendor | |
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ env.cache-name }}- | |
| ${{ runner.os }}-build- | |
| ${{ runner.os }}- | |
| - name: Install PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.5' | |
| tools: composer:2 | |
| - name: Install dependencies | |
| run: composer install | |
| - name: Kjør Sync2Pureservice | |
| env: | |
| JAMFPRO_SECRET: ${{ secrets.JAMFPRO_SECRET }} | |
| PURESERVICE_APIKEY: ${{ secrets.PURESERVICE_APIKEY }} | |
| MICROSOFT_GRAPH_CLIENT_SECRET: ${{ secrets.MICROSOFT_GRAPH_CLIENT_SECRET }} | |
| REDIS_PASSWORD: ${{ secrets.REDIS_SECRET }} | |
| MAIL_PASSWORD: ${{ secrets.MAIL_PASSWORD }} | |
| EF_IP_PASSWORD: ${{ secrets.INTEGRASJONSPUNKT_PASSWORD }} | |
| run: | | |
| php sync2pureservice migrate:fresh --force | |
| php sync2pureservice eformidling:inn | |
| - name: Feilmelding til Teams | |
| if: failure() | |
| uses: carriquiry-g/ms-teams-notification@v2 # https://github.com/marketplace/actions/microsoft-teams-channel-notification | |
| with: | |
| github-token: ${{ github.token }} # this will use the runner's token. | |
| ms-teams-webhook-uri: ${{ secrets.TEAMS_DRIFTSMELDINGER_WEBHOOK_URI }} | |
| notification-summary: Feil ved mottak fra eFormidling | |
| notification-style: attention | |
| timezone: Europe/Oslo | |
| verbose-logging: false | |
| - name: Archive storage | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: storage | |
| path: | | |
| storage/app/private** |