Skip to content

.github/workflows/main.yml #498

.github/workflows/main.yml

.github/workflows/main.yml #498

Workflow file for this run

on:
schedule:
# twice a day at 1am & 1pm
- cron: "0 1,13 * * *"
jobs:
sync_laravel_nova_job:
runs-on: ubuntu-latest
name: "Syncs Laravel Nova Releases"
steps:
- uses: actions/checkout@v4
- name: "Runs sync action"
id: "releases"
uses: "./.github/actions/sync-nova"
with:
target_nova_repo: ${{ vars.TARGET_NOVA_REPO }}
personal_access_token: ${{ secrets.NOVA_REPO_ACCESS_TOKEN }}
nova_user: ${{ secrets.NOVA_USER }}
nova_password: ${{ secrets.NOVA_PASSWORD }}
- uses: actions/checkout@v4
name: "Checkout target nova repository"
with:
repository: ${{ vars.TARGET_NOVA_REPO }}
token: ${{ secrets.NOVA_REPO_ACCESS_TOKEN }}
- name: "Update tracking repository"
env:
GH_TOKEN: ${{ secrets.NOVA_REPO_ACCESS_TOKEN }}
NOVA_AUTH_ENCODED: ${{ steps.releases.outputs.nova_auth_encoded }}
run: |
git rm -rfq .
git config --global user.email "[email protected]"
git config --global user.name "Kaspar Rosin"
# Install nova zip file
wget -dq \
--output-document nova.zip \
--header="Authorization: Basic ${{ env.NOVA_AUTH_ENCODED }}" \
${{ steps.releases.outputs.nova_dist_url }}
# Extract and delete zip file
unzip -qq nova.zip
rm nova.zip
# Commit changes & create release
git add .
git commit -m ${{ steps.releases.outputs.next_release_tag }}
git push --force
git tag ${{ steps.releases.outputs.next_release_tag }}
git push --tags
gh release create ${{ steps.releases.outputs.next_release_tag }}