Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
trivarialthea authored Mar 24, 2024
1 parent 7cdc049 commit 23e000c
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build And Upload Docker Image

on: [push]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- id: string
uses: ASzc/change-string-case-action@v2
with:
string: ${{ github.repository }}
- name: Build the ${{ github.repository }} Docker image
run: |
docker build . --tag ghcr.io/${{ steps.string.outputs.lowercase }}:latest
docker push ghcr.io/${{ steps.string.outputs.lowercase }}:latest

0 comments on commit 23e000c

Please sign in to comment.