Skip to content

Commit a8f9d60

Browse files
authored
Fix GHCR Permissions of GHA Runners (#28)
* [gha] fix ghcr permissions * [gha] set copilot workflow checkout fetch depth * [gha] remove dual sync * [gha] fix ghcr image names * [gha] fix ghcr image names * [gha] remove latest tag on publication * [gha] add `--no-install-project`
1 parent 744434a commit a8f9d60

File tree

3 files changed

+23
-8
lines changed

3 files changed

+23
-8
lines changed

.github/workflows/containerfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212

1313
env:
1414
REGISTRY: ghcr.io
15-
IMAGE_NAME: ${{ github.repository }}
15+
IMAGE_NAME: epiforesite/epiworldpythonstreamlit
1616

1717
jobs:
1818
build-and-push:

.github/workflows/copilot.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,38 @@ name: GitHub Copilot Dev Environment
33
on:
44
workflow_dispatch:
55

6+
permissions:
7+
contents: read
8+
packages: read
9+
610
jobs:
711
copilot:
812
runs-on: ubuntu-latest
913
container:
10-
image: ghcr.io/${{ github.repository }}:latest
14+
image: ghcr.io/epiforesite/epiworldpythonstreamlit:latest
1115
credentials:
1216
username: ${{ github.actor }}
1317
password: ${{ secrets.GITHUB_TOKEN }}
1418

1519
steps:
1620
- name: Checkout repository
1721
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
1824

1925
- name: Sync dependencies
20-
run: uv sync --frozen
26+
run: uv sync --frozen --group dev --no-install-project
27+
28+
- name: Install development dependencies and tools
29+
run: |
30+
sudo apt-get update && sudo apt-get install -y \
31+
git \
32+
vim \
33+
nano \
34+
curl \
35+
wget
2136
22-
- name: Setup Copilot environment
37+
- name: Verify development environment
2338
run: |
2439
echo "Development environment ready for GitHub Copilot"
2540
echo "Python version: $(python --version)"

.github/workflows/on_pr.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ on:
44
pull_request:
55
branches: [main]
66

7-
env:
8-
REGISTRY: ghcr.io
9-
IMAGE_NAME: ${{ github.repository }}
7+
permissions:
8+
contents: read
9+
packages: read
1010

1111
jobs:
1212
test:
1313
runs-on: ubuntu-latest
1414
container:
15-
image: ghcr.io/${{ github.repository }}:latest
15+
image: ghcr.io/epiforesite/epiworldpythonstreamlit:latest
1616
credentials:
1717
username: ${{ github.actor }}
1818
password: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)