Skip to content

Commit f5f2347

Browse files
committed
fix github action
1 parent 49ecf09 commit f5f2347

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,20 @@ on:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12+
13+
permissions:
14+
actions: read
15+
contents: read
16+
packages: write
17+
1218
steps:
1319
- name: Checkout repository
1420
uses: actions/checkout@v3
1521

1622
- name: Generate tags
17-
run: echo "IMG_TAG=${GITHUB_SHA::7}" >> $GITHUB_ENV
23+
run: |
24+
repo=${{ github.repository }};
25+
echo "IMG_TAG=ghcr.io/${repo,,}/5k-dedi:${GITHUB_SHA::7}" >> $GITHUB_ENV
1826
1927
- name: Set up Docker Buildx
2028
uses: docker/setup-buildx-action@v2
@@ -27,4 +35,8 @@ jobs:
2735
password: ${{secrets.GITHUB_TOKEN}}
2836

2937
- name: Build Docker image
30-
run: docker buildx build --push -t ghcr.io/${{ github.repository }}/5k-dedicated:${{ env.IMG_TAG }} .
38+
uses: docker/build-push-action@v2
39+
with:
40+
context: .
41+
push: true
42+
tags: ${{ env.IMG_TAG }}

0 commit comments

Comments
 (0)