Skip to content

Merge pull request #14 from massix/next #15

Merge pull request #14 from massix/next

Merge pull request #14 from massix/next #15

Workflow file for this run

name: Release
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: read
checks: read
jobs:
deploy:
name: Deploy on DockerHub
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
- run: |
export IMAGE="${{ secrets.DOCKER_REGISTRY_USERNAME }}/$(make image-name)"
make docker
docker push "${IMAGE}:$(make image-tag)"
docker tag "${IMAGE}:$(make image-tag)" "${IMAGE}:latest"
docker push "${IMAGE}:latest"
release:
name: Create Release
runs-on: ubuntu-latest
needs: deploy
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Install Cocogitto
uses: cocogitto/cocogitto-action@v3
with:
release: false
check: false
git-user: 'github-actions[bot]'
git-user-email: 'github-actions@github.com'
- name: Bump version
id: version
run: |
make image-tag
cog bump --version "$(make image-tag)"
cog changelog --at "v$(make image-tag)" > tmp.md
echo "version=$(make image-tag)" >> $GITHUB_OUTPUT
- name: Push back to repository
run: |
git config user.email "github-actions@github.com"
git config user.name "github-actions[bot]"
git push
git push --tags
- uses: softprops/action-gh-release@v2
with:
body_path: tmp.md
generate_release_notes: true
make_latest: "true"
draft: false
tag_name: v${{ steps.version.outputs.version }}
name: v${{ steps.version.outputs.version }}