Skip to content

Commit

Permalink
Fungerer det å kjøre container på macOS?
Browse files Browse the repository at this point in the history
  • Loading branch information
EirikWulff committed Jun 19, 2024
1 parent 73b15fe commit 08a4f8a
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 4 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/eformidling-mottak.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Mottak fra eFormidling

on:
workflow_dispatch:
schedule:
- cron: "15 7-20 * * 1-5"
- cron: "24 */6 * * 0,6"

jobs:
mottak:

runs-on: [self-hosted, macOS]
environment:
name: production

steps:
- uses: actions/checkout@v4
- 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.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@v4
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 dependencies
run: composer install
- name: Run Jamf2Pureservice
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: |
./artisan migrate:fresh --force
./artisan eformidling:inn
5 changes: 1 addition & 4 deletions .github/workflows/utsending.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
runs-on: [self-hosted, docker, macOS]
environment:
name: production
container: dibk/sync2pureservice:latest

steps:
- uses: actions/checkout@v4
Expand All @@ -25,9 +26,6 @@ jobs:
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 }}
Expand All @@ -53,7 +51,6 @@ jobs:
run: composer install
- name: Run Jamf2Pureservice
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 }}
Expand Down

0 comments on commit 08a4f8a

Please sign in to comment.