Skip to content

Commit

Permalink
Added github container build step
Browse files Browse the repository at this point in the history
  • Loading branch information
justalemon committed Mar 5, 2024
1 parent 74b3067 commit 8c924e5
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
push:
pull_request:

permissions:
# ghcr.io
packages: write

jobs:
lint:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -36,3 +40,30 @@ jobs:
with:
name: ${{ github.event.repository.name }}
path: dist/*
docker:
runs-on: ubuntu-22.04
needs:
- build
steps:
- uses: actions/[email protected]
- uses: docker/[email protected]
- uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- uses: docker/[email protected]
id: meta
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,format=short,prefix=
type=raw,value=latest,enable={{ is_default_branch }}
- uses: docker/[email protected]
- uses: docker/[email protected]
if: ${{ format('refs/heads/{0}', github.event.repository.default_branch) == github.ref || startsWith(github.ref, 'refs/tags/') }}
with:
push: true
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit 8c924e5

Please sign in to comment.