Skip to content

Pureservice - brukeropprydding #119

Pureservice - brukeropprydding

Pureservice - brukeropprydding #119

Workflow file for this run

name: Pureservice - brukeropprydding
on:
workflow_dispatch:
schedule:
- cron: "14 6,11 * * 1-5"
jobs:
usercleanup:
runs-on: [self-hosted]
concurrency:
group: usercleanup
cancel-in-progress: true
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
PURESERVICE_URL=${{ vars.PURESERVICE_URL }}
REDIS_HOST=${{ vars.REDIS_HOST }}
CACHE_DRIVER=${{ vars.CACHE_DRIVER }}
MAIL_MAILER=${{ vars.MAILER }}
MAIL_HOST=${{ vars.MAIL_HOST }}
MAIL_USER=${{ vars.MAIL_USER }}
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: Rydder i sluttbrukere i Pureservice
env:
REDIS_PASSWORD: ${{ secrets.REDIS_SECRET }}
MAIL_PASSWORD: ${{ secrets.MAIL_PASSWORD }}
PURESERVICE_APIKEY: ${{ secrets.PURESERVICE_APIKEY }}
run: |
./sync2pureservice migrate:fresh --force
./sync2pureservice pureservice:user-cleanup