Jamf Pro > Pureservice #310
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: Jamf Pro > Pureservice | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "48 6,11,14 * * 1-5" | |
jobs: | |
jamf2pureservice: | |
runs-on: [self-hosted] | |
concurrency: | |
group: jamf2pureservice | |
cancel-in-progress: true | |
environment: | |
name: jamf2pureservice | |
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: | | |
./sync2pureservice migrate:fresh --force | |
./sync2pureservice pureservice:sync-jamf |