Skip to content

ci: fix cog configuration for GitHub #10

ci: fix cog configuration for GitHub

ci: fix cog configuration for GitHub #10

Workflow file for this run

name: Release
on:
push:
tags: ['v*']
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
run: |
export TAG=""
TAG="${{ github.ref_name }}"
export VERSION="${TAG:1}"
cog bump --version "${VERSION}"
cog changelog --at "${TAG}" > tmp.md
- name: Push back to repository
run: |
git config user.email "github-actions@github.com"
git config user.name "github-actions[bot]"
git push HEAD:main
- uses: softprops/action-gh-release@v2
with:
body_path: tmp.md
generate_release_notes: true
make_latest: "true"
draft: false