Skip to content

fix: .egg-info ignores in .gitignore (#23) #60

fix: .egg-info ignores in .gitignore (#23)

fix: .egg-info ignores in .gitignore (#23) #60

Workflow file for this run

---
name: deploy
on: # yamllint disable-line rule:truthy
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
environment: ["staging", "firefoxci"]
env:
TASKCLUSTER_ROOT_URL: ${{vars.TASKCLUSTER_ROOT_URL}}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
- name: Install dependencies
run: pip install -r requirements/test.txt
- name: Set root url
run: |
if [ "${{ matrix.environment }}" == "staging" ]; then
echo "TASKCLUSTER_ROOT_URL=https://stage.taskcluster.nonprod.cloudops.mozgcp.net" >> $GITHUB_ENV;
elif [ "${{ matrix.environment }}" == "firefoxci" ]; then
echo "TASKCLUSTER_ROOT_URL=https://firefox-ci-tc.services.mozilla.com" >> $GITHUB_ENV;
fi
- name: Run checks
run: tc-admin check --environment ${{matrix.environment}}
apply:
if: github.event_name == 'push'
runs-on: ubuntu-latest
needs: check
environment: apply-${{matrix.environment}}
strategy:
matrix:
environment: ["staging", "firefoxci"]
env:
TASKCLUSTER_ROOT_URL: ${{vars.TASKCLUSTER_ROOT_URL}}
TASKCLUSTER_CLIENT_ID: ${{vars.TASKCLUSTER_CLIENT_ID}}
TASKCLUSTER_ACCESS_TOKEN: ${{secrets.TASKCLUSTER_ACCESS_TOKEN}}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
- name: Install dependencies
run: pip install -r requirements/base.txt
- name: Deploy environment
id: apply_config
run: tc-admin apply --environment ${{matrix.environment}}
notify:
if: github.event_name == 'push' && always()
runs-on: ubuntu-latest
needs: [check, apply]
steps:
- name: Notify Slack
if: always()
run: |
WORKFLOW_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
SLACK_MESSAGE="*Deploy ${{ github.repository }}* (<${WORKFLOW_URL}|view workflow>)"
if [ "${{ needs.check.result }}" == "success" ]; then
SLACK_MESSAGE="${SLACK_MESSAGE}\n:white_check_mark: *check* succeeded"
else
SLACK_MESSAGE="${SLACK_MESSAGE}\n:x: *check* failed"
fi
if [ "${{ needs.apply.result }}" == "success" ]; then
SLACK_MESSAGE="${SLACK_MESSAGE}\n:white_check_mark: *apply* succeeded"
else
SLACK_MESSAGE="${SLACK_MESSAGE}\n:x: *apply* failed"
fi
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"${SLACK_MESSAGE}\"}" ${{ secrets.SLACK_WEBHOOK_URL }}