Build SAs every night #1862
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build SAs every night | |
on: | |
# manually | |
workflow_dispatch: | |
# also on webhooks | |
repository_dispatch: | |
pull_request: | |
push: | |
branches: | |
- master | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '30 21 * * *' | |
jobs: | |
build: | |
name: Build SAs nightly | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- uses: actions/checkout@v2 | |
- uses: ./deploy/ | |
env: | |
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }} | |
- name: yaml permissions | |
if: github.ref == 'refs/heads/master' | |
run: | | |
git config core.fileMode false | |
sudo chmod -R 777 sa_yaml | |
git status | |
git add sa_yaml | |
- name: Create Pull Request | |
if: github.ref == 'refs/heads/master' | |
with: | |
body: This here PR, although it looks like it's made by me, is totally made by computers in the cloud ☁️ | |
token: ${{ secrets.PAT }} | |
commit-message: "Drupal Contrib SA ${{ steps.date.outputs.date }}" | |
title: "Drupal Contrib SA ${{ steps.date.outputs.date }}" | |
id: cpr | |
uses: peter-evans/create-pull-request@v3 |