Skip to content

cronjob to sync with s3 #1

cronjob to sync with s3

cronjob to sync with s3 #1

Workflow file for this run

name: S3-synchronization-cronjob
on:
push:
branches-ignore:
- master
- dev
jobs:
sync:
runs-on: ubuntu-latest
steps:

Check failure on line 12 in .github/workflows/s3-sync.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/s3-sync.yml

Invalid workflow file

You have an error in your yaml syntax on line 12
- uses: actions/checkout@v4
with:
ref: master
- name: Generate random number
id: random
run: echo "::set-output name=value::$(echo $RANDOM)"
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Create branch
uses: peterjgrainger/[email protected]
with:
branch: sync-${{ steps.random.outputs.value }}
- name: create env file
run: |
touch .env
echo AWS_STARPORT_BAR_AK=${{ secrets.AWS_STARPORT_BAR_AK }} >> .env
echo AWS_STARPORT_BAR_SAK=${{ secrets.AWS_STARPORT_BAR_SAK }} >> .env
echo REPOSITORY_ID=${{ secrets.REPOSITORY_ID }} >> .env
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- run: npm install
- run: npm run sync-script
- name: commit and push new file
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git add .
git commit -m "Sync docs folder"
git push -u origin sync-${{ steps.random.outputs.value }}
- name: create pull request towards the main branch
uses: peter-evans/[email protected]
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: Auto Pull Request
title: Docs auto-synchronization with S3
body: Auto-created Pull Request
branch: sync-${{ steps.random.outputs.value }}
base: master