Actually continuously integrate #4
Workflow file for this run
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: CI | ||
on: | ||
push: | ||
branches: [main] | ||
issue_comment: | ||
types: [created] | ||
pull_request: {} | ||
workflow_dispatch: {} | ||
defaults: | ||
if: github.event_name != 'issue_comment' || (github.event.issue.pull_request && github.event.comment.body == '.format') | ||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Validate JSON & YAML files | ||
uses: GrantBirki/[email protected] | ||
format: | ||
runs-on: ubuntu-latest | ||
needs: validate | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Try formatting YAML files | ||
uses: ./.github/actions/format | ||
- name: Fail if changes are needed | ||
if: github.event_name != 'issue_comment' | ||
uses: tj-actions/verify-changed-files@v20 | ||
with: | ||
fail-if-changed: true | ||
- name: Push changes | ||
if: github.event_name == 'issue_comment' || github.event_name == 'workflow_dispatch' | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: Format YAML files | ||
commit_author: "github-actions[bot] <>" | ||
test: | ||
runs-on: ubuntu-latest | ||
needs: format | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3 | ||
- name: Install OctoDNS | ||
run: pip install octodns==0.9.10 | ||
- name: Make sure OctoDNS knows what to do | ||
run: ./bin/dry-run | ||
env: | ||
DNSIMPLE_ACCOUNT_NUMBER: ${{ secrets.DNSIMPLE_ACCOUNT_NUMBER }} | ||
DNSIMPLE_API_KEY: ${{ secrets.DNSIMPLE_API_KEY }} |