Rotate GitHub credential #1
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 | |
paths: | |
- '*' | |
pull_request: | |
branches: | |
- main | |
defaults: | |
run: | |
working-directory: . | |
jobs: | |
update: | |
name: Update | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install Black | |
run: pip install black | |
- name: Run Black | |
uses: psf/black@stable | |
with: | |
src: "." | |
- name: Install flake8 | |
run: pip install flake8 | |
- uses: TrueBrain/actions-flake8@v2 | |
- name: Install Pulumi | |
run: | | |
python3 -m venv venv | |
venv/bin/pip install -r requirements.txt | |
- name: Run pulumi preview | |
if: github.event_name == 'pull_request' | |
uses: pulumi/actions@v4 | |
with: | |
command: preview | |
stack-name: org | |
comment-on-pr: true | |
work-dir: "." | |
env: | |
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | |
- name: Run pulumi up | |
if: github.event_name == 'push' | |
uses: pulumi/actions@v4 | |
with: | |
command: up | |
stack-name: org | |
work-dir: "." | |
env: | |
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} |