Skip to content

Commit 1dd639b

Browse files
committed
permissions for github_token
1 parent fdbea30 commit 1dd639b

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/docker-image.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@ env:
1111
IMAGE_NAME: ${{ github.repository }}
1212

1313
jobs:
14-
15-
build:
16-
14+
build-and-push-image:
1715
runs-on: ubuntu-latest
1816

17+
permissions:
18+
contents: read
19+
packages: write
20+
attestations: write
21+
id-token: write
22+
1923
steps:
20-
- uses: actions/checkout@v4
21-
- name: Build the Docker image
22-
run: docker build . --file Dockerfile --tag finance:$(date +%s)
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
2326

2427
- name: Login to GitHub Packages
2528
uses: docker/login-action@v2
@@ -28,7 +31,7 @@ jobs:
2831
username: ${{ github.actor }}
2932
password: ${{ secrets.GITHUB_TOKEN }}
3033
- name: Push the Docker image to GitHub Packages
31-
uses: docker/build-push-action@v2
34+
uses: docker/build-push-action@v6
3235
with:
3336
context: .
3437
push: true

0 commit comments

Comments
 (0)