Skip to content

Commit 23e000c

Browse files
Create main.yml
1 parent 7cdc049 commit 23e000c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Build And Upload Docker Image
2+
3+
on: [push]
4+
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: Login to GitHub Container Registry
12+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
13+
- id: string
14+
uses: ASzc/change-string-case-action@v2
15+
with:
16+
string: ${{ github.repository }}
17+
- name: Build the ${{ github.repository }} Docker image
18+
run: |
19+
docker build . --tag ghcr.io/${{ steps.string.outputs.lowercase }}:latest
20+
docker push ghcr.io/${{ steps.string.outputs.lowercase }}:latest

0 commit comments

Comments
 (0)