Skip to content

Commit

Permalink
feat(.github/workflows/docker-image.yml): adding automatic docker bui…
Browse files Browse the repository at this point in the history
…lding using github packaging
  • Loading branch information
Ahwxorg authored Sep 2, 2023
1 parent 9a85739 commit 7dfb52b
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Docker Image CI
on:
push:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v3
- uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: owner
uses: ASzc/change-string-case-action@v5
with:
string: ${{ github.repository_owner }}
- id: repo
uses: ASzc/change-string-case-action@v5
with:
string: ${{ github.event.repository.name }}
- uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
push: true
tags: |
ghcr.io/${{ steps.owner.outputs.lowercase }}/${{ steps.repo.outputs.lowercase }}:latest

0 comments on commit 7dfb52b

Please sign in to comment.