Skip to content

Commit 67be1d7

Browse files
committed
Revert commit 4c2c419
Wrong repo.
1 parent 4c2c419 commit 67be1d7

File tree

4 files changed

+176
-0
lines changed

4 files changed

+176
-0
lines changed

.github/workflows/ci.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- "!dependabot/**"
8+
pull_request:
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
test:
16+
name: Python ${{ matrix.python }} on ${{ matrix.os }}
17+
runs-on: ${{ matrix.os }}
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
python:
23+
- '3.8'
24+
- '3.9'
25+
- '3.10'
26+
- '3.11'
27+
- '3.12'
28+
os:
29+
- ubuntu-latest
30+
include:
31+
- os: macos-latest
32+
python: '3.8'
33+
- os: macos-latest
34+
python: '3.12'
35+
- os: windows-latest
36+
python: '3.8'
37+
- os: windows-latest
38+
python: '3.12'
39+
40+
steps:
41+
- name: Clone repository
42+
uses: actions/checkout@v4
43+
with:
44+
persist-credentials: false
45+
46+
- name: Set up Python
47+
uses: actions/setup-python@v5
48+
with:
49+
python-version: ${{ matrix.python }}
50+
cache: pip
51+
52+
- name: Print versions
53+
run: |
54+
python --version
55+
pip --version
56+
57+
- name: Install Python dependencies
58+
run: pip install -r requirements.txt
59+
60+
- name: Run lint
61+
run: flake8
62+
63+
- name: Run makeHosts.py
64+
run: python makeHosts.py
65+
66+
- name: Run tests
67+
run: python testUpdateHostsFile.py

.github/workflows/codeql-analysis.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- "!dependabot/**"
8+
pull_request:
9+
branches:
10+
- master
11+
- "!dependabot/**"
12+
schedule:
13+
- cron: "40 15 * * 4"
14+
workflow_dispatch:
15+
16+
jobs:
17+
analyze:
18+
name: Analyze
19+
runs-on: ubuntu-latest
20+
permissions:
21+
actions: read
22+
contents: read
23+
security-events: write
24+
25+
steps:
26+
- name: Clone repository
27+
uses: actions/checkout@v4
28+
with:
29+
persist-credentials: false
30+
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@v3
33+
with:
34+
languages: "python"
35+
queries: +security-and-quality
36+
37+
- name: Autobuild
38+
uses: github/codeql-action/autobuild@v3
39+
40+
- name: Perform CodeQL Analysis
41+
uses: github/codeql-action/analyze@v3
42+
with:
43+
category: "/language:python"

.github/workflows/container.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Create and publish a container image
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- "*"
9+
10+
env:
11+
REGISTRY: ghcr.io
12+
IMAGE_NAME: ${{ github.repository }}
13+
14+
jobs:
15+
build-and-push-image:
16+
name: Build and push container image
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
packages: write
21+
steps:
22+
- name: Clone repository
23+
uses: actions/checkout@v4
24+
with:
25+
persist-credentials: false
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v3
29+
30+
- name: Log in to the Container registry
31+
uses: docker/login-action@v3
32+
with:
33+
registry: ${{ env.REGISTRY }}
34+
username: ${{ github.actor }}
35+
password: ${{ secrets.GITHUB_TOKEN }}
36+
37+
- name: Extract metadata (tags, labels)
38+
id: meta
39+
uses: docker/metadata-action@v5
40+
with:
41+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
42+
43+
- name: Build and push container image
44+
uses: docker/build-push-action@v6
45+
with:
46+
context: .
47+
push: ${{ github.event_name != 'pull_request' }}
48+
tags: ${{ steps.meta.outputs.tags }}
49+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/depsreview.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: 'Dependency Review'
2+
on: [pull_request]
3+
4+
permissions:
5+
contents: read
6+
7+
jobs:
8+
dependency-review:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Clone repository
12+
uses: actions/checkout@v4
13+
with:
14+
persist-credentials: false
15+
16+
- name: Dependency Review
17+
uses: actions/dependency-review-action@v4

0 commit comments

Comments
 (0)