name: test on: [push, pull_request, workflow_dispatch] jobs: test: runs-on: ubuntu-latest strategy: fail-fast: false matrix: python-version: ['3.11', '3.12', '3.13', '3.14'] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade uv uv sync - name: Lint run: | uv run flake8 uv run mypy . uv run reuse lint - name: Test run: | uv run pytest deploy: permissions: contents: read packages: write needs: [test] runs-on: ubuntu-latest if: (github.repository == 'msys2/msys2-web' && github.event_name == 'push' && github.ref == 'refs/heads/main') steps: - uses: actions/checkout@v4 - name: Log in run: | echo "$TOKEN" | docker login ghcr.io --username "$USERNAME" --password-stdin env: TOKEN: ${{ secrets.GITHUB_TOKEN }} USERNAME: ${{ github.actor }} - name: Build image run: | docker build --tag ghcr.io/msys2/msys2-web:latest . - name: Deploy image run: | docker push ghcr.io/msys2/msys2-web:latest