Enhance booking time management by adding configurable time slots and improve sync workflow error handling
This commit is contained in:
parent
ffbac14108
commit
0dd5432bb8
3 changed files with 32 additions and 20 deletions
15
.github/workflows/sync-to-public.yml
vendored
15
.github/workflows/sync-to-public.yml
vendored
|
|
@ -10,12 +10,23 @@ jobs:
|
|||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if token is set
|
||||
run: |
|
||||
if [ -z "${{ secrets.PUBLIC_REPO_TOKEN }}" ]; then
|
||||
echo "❌ ERROR: PUBLIC_REPO_TOKEN secret is not set!"
|
||||
exit 1
|
||||
else
|
||||
echo "✅ PUBLIC_REPO_TOKEN is set"
|
||||
fi
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Remove sync workflow and push to public repo
|
||||
env:
|
||||
TOKEN: ${{ secrets.PUBLIC_REPO_TOKEN }}
|
||||
run: |
|
||||
# Configure git
|
||||
git config user.name "github-actions[bot]"
|
||||
|
|
@ -28,6 +39,6 @@ jobs:
|
|||
git rm .github/workflows/sync-to-public.yml
|
||||
git commit -m "Remove sync workflow for public repo"
|
||||
|
||||
# Push to public repo
|
||||
git remote add public https://x-access-token:${{ secrets.PUBLIC_REPO_TOKEN }}@github.com/wiestju/anny-booking-automation.git
|
||||
# Push to public repo using env var (more secure)
|
||||
git remote add public "https://x-access-token:${TOKEN}@github.com/wiestju/anny-booking-automation.git"
|
||||
git push public temp-sync-branch:main --force
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue