feat: initial version. Docker image, tag creation and release with github actions. Fixes #1 and #2

This commit is contained in:
natilou 2023-07-22 20:15:18 -03:00
parent 2afbf652dc
commit e077e5d438
2 changed files with 67 additions and 0 deletions

44
.github/workflows/deploy.yml vendored Normal file
View File

@ -0,0 +1,44 @@
name: build_docker_image
on:
push:
tags:
- 'v*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

23
.github/workflows/release-please.yml vendored Normal file
View File

@ -0,0 +1,23 @@
on:
push:
branches:
- master
permissions:
contents: write
pull-requests: write
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: release-please
id: release
uses: google-github-actions/release-please-action@v3
with:
release-type: simple
package-name: release
bump-minor-pre-major: true
token: ${{ secrets.PAT }}