Repository navigation
Staging #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Staging #147
Changes from 8 commits
dbe9ae8
e76f37c
15f0231
cce6ff8
d840b6b
f29764a
eaa9c47
3def191
6f1df86
6e99983
571327e
fbdb5fe
d7a4397
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,71 @@ | ||||||||||||||||||||||
| # Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy | ||||||||||||||||||||||
| # More GitHub Actions for Azure: https://github.com/Azure/actions | ||||||||||||||||||||||
| # More info on Python, GitHub Actions, and Azure App Service: https://aka.ms/python-webapps-actions | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| name: Build and deploy Python app to Azure Web App - queryweaver | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| on: | ||||||||||||||||||||||
| push: | ||||||||||||||||||||||
| branches: | ||||||||||||||||||||||
| - staging | ||||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||
| build: | ||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||
| contents: read #This is required for actions/checkout | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| steps: | ||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Set up Python version | ||||||||||||||||||||||
| uses: actions/setup-python@v5 | ||||||||||||||||||||||
| with: | ||||||||||||||||||||||
| python-version: '3.12' | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Create and start virtual environment | ||||||||||||||||||||||
| run: | | ||||||||||||||||||||||
| python -m venv venv | ||||||||||||||||||||||
| source venv/bin/activate | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Install dependencies | ||||||||||||||||||||||
| run: pip install -r requirements.txt | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Virtualenv is not active across steps; installs go to the system interpreter. Simplify. Apply: - - name: Create and start virtual environment
- run: |
- python -m venv venv
- source venv/bin/activate
-
- - name: Install dependencies
- run: pip install -r requirements.txt
+ - name: Install dependencies
+ run: python -m pip install -r requirements.txt📝 Committable suggestion
Suggested change
🧰 Tools🪛 YAMLlint (1.37.1)[error] 31-31: trailing spaces (trailing-spaces) [error] 34-34: trailing spaces (trailing-spaces) 🤖 Prompt for AI Agents |
||||||||||||||||||||||
| # Optional: Add step to run tests here (PyTest, Django test suites, etc.) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Upload artifact for deployment jobs | ||||||||||||||||||||||
| uses: actions/upload-artifact@v4 | ||||||||||||||||||||||
| with: | ||||||||||||||||||||||
| name: python-app | ||||||||||||||||||||||
| path: | | ||||||||||||||||||||||
| . | ||||||||||||||||||||||
| !venv/ | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| deploy: | ||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||
| needs: build | ||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||
| id-token: write #This is required for requesting the JWT | ||||||||||||||||||||||
| contents: read #This is required for actions/checkout | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| steps: | ||||||||||||||||||||||
| - name: Download artifact from build job | ||||||||||||||||||||||
| uses: actions/download-artifact@v4 | ||||||||||||||||||||||
| with: | ||||||||||||||||||||||
| name: python-app | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: Login to Azure | ||||||||||||||||||||||
| uses: azure/login@v2 | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| with: | ||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Pin 3rd-party actions to commit SHAs Pin azure/login and azure/webapps-deploy to immutable SHAs to reduce supply-chain risk. Consider pinning other actions too (checkout, setup-python, upload/download-artifact). Apply this pattern (replace with the current published commit): - - name: Login to Azure
- uses: azure/login@v2
+ - name: Login to Azure
+ uses: azure/login@<commit-sha>
- - name: 'Deploy to Azure Web App'
- uses: azure/webapps-deploy@v3
+ - name: 'Deploy to Azure Web App'
+ uses: azure/webapps-deploy@<commit-sha>Also applies to: 66-66 🧰 Tools🪛 GitHub Check: CodeQL[warning] 59-59: Unpinned tag for a non-immutable Action in workflow 🤖 Prompt for AI Agents |
||||||||||||||||||||||
| client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_95C84156557F40AF875812F7C29CD989 }} | ||||||||||||||||||||||
| tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_B26FFD333BD44EE98C7ACED0A22637B7 }} | ||||||||||||||||||||||
| subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_DEEC4D371D1547A6A3F63C9FE22DF791 }} | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| - name: 'Deploy to Azure Web App' | ||||||||||||||||||||||
| uses: azure/webapps-deploy@v3 | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| id: deploy-to-webapp | ||||||||||||||||||||||
| with: | ||||||||||||||||||||||
| app-name: 'queryweaver' | ||||||||||||||||||||||
| slot-name: 'staging' | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix linter blockers: CRLF/EOL and trailing spaces.
Convert file to LF, trim trailing spaces (Lines 31, 34, 57, 71), and add a newline at EOF. Consider enforcing via .gitattributes: "*.yml text eol=lf".
Also applies to: 31-31, 34-34, 57-57, 71-71
🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 1-1: wrong new line character: expected \n
(new-lines)
🤖 Prompt for AI Agents