mirror of
https://github.com/EpicMorg/atlassian-json.git
synced 2025-01-07 12:35:46 +03:00
67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
name: json-updater
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- '*'
|
|
tags:
|
|
- '*'
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
schedule:
|
|
- cron: '0 0-23 * * *' # every hour
|
|
|
|
jobs:
|
|
update:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
- name: Get current date
|
|
id: date
|
|
run: echo "RELEASE_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Configure git
|
|
run: |
|
|
cd json-backups
|
|
ls -las
|
|
git config --global user.name "github-actions[bot]"
|
|
git config --global user.email "stamepicmorg@users.noreply.github.com"
|
|
|
|
- name: Update files
|
|
env:
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
|
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
|
run: |
|
|
cd json-backups
|
|
ls -las
|
|
./update.sh
|
|
cd ..
|
|
git add .
|
|
git commit -am "Atlassian JSON autoupdated"
|
|
git push
|
|
|
|
# - name: Commit and push changes
|
|
# uses: devops-infra/action-commit-push@master
|
|
# with:
|
|
# github_token: ${{ secrets.GHT }}
|
|
# commit_message: Atlassian JSON updated
|
|
|
|
# - name: Create Release
|
|
# id: create_release
|
|
# uses: actions/create-release@v1
|
|
# env:
|
|
# GITHUB_TOKEN: ${{ secrets.GHT }}
|
|
# with:
|
|
# tag_name: ${{ env.RELEASE_DATE }}
|
|
# release_name: Release ${{ env.RELEASE_DATE }}
|
|
# body: |
|
|
# Changes in this Release
|
|
# - Atlassian JSON updated ${{ env.RELEASE_DATE }}
|
|
# draft: false
|
|
# prerelease: false
|