Skip to content

Commit 7f25dc4

Browse files
committedJun 18, 2024··
Merge remote-tracking branch 'origin/main'
2 parents f87bb24 + e4a670f commit 7f25dc4

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed
 

‎.github/workflows/dotnet-core.yml

+33-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v4.1.5
15+
- name: Checkout
16+
uses: actions/checkout@v4.1.5
1617

1718
- name: Setup .NET Core
1819
uses: actions/setup-dotnet@v4.0.0
@@ -32,3 +33,34 @@ jobs:
3233
run: |
3334
wget https://raw.githubusercontent.com/Yucked/Scripy/master/Powershell/ActionSend.ps1
3435
pwsh .\ActionSend.ps1 ${{ secrets.WEBHOOK }} ${{ job.status }}
36+
37+
38+
publish:
39+
name: Publish to GitHub
40+
runs-on: ubuntu-latest
41+
needs: build
42+
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v4
46+
47+
- name: Docker Login
48+
uses: docker/login-action@v3
49+
with:
50+
registry: ghcr.io
51+
username: ${{ github.repository_owner }}
52+
password: ${{ secrets.GITHUB_TOKEN }}
53+
54+
- name: Normalize repository name
55+
id: norm_name
56+
run: |
57+
echo IMAGE_NAME=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
58+
59+
- name: Build and push Docker images
60+
uses: docker/build-push-action@v5
61+
with:
62+
context: .
63+
push: true
64+
tags: |
65+
ghcr.io/${{ env.IMAGE_NAME }}:latest
66+
ghcr.io/${{ env.IMAGE_NAME }}:${{ github.run_number }}

0 commit comments

Comments
 (0)
Please sign in to comment.