Skip to content

Commit

Permalink
feat: add github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
saman2000hoseini committed Jul 11, 2023
1 parent 99fdf6e commit 0ed3ac2
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: ci
on:
push:
branches: [ main ]
tags: [ v* ]
pull_request:
branches: [ main ]

jobs:
docker:
name: docker
runs-on: ubuntu-latest
needs:
- lint
- test
steps:
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v3
id: meta
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- uses: docker/build-push-action@v2
with:
file: "Dockerfile"
context: .
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 0ed3ac2

Please sign in to comment.