Skip to content

fix: changing release branch #1

fix: changing release branch

fix: changing release branch #1

Workflow file for this run

name: Docker Build, Changelog, and Release
on:
push:
branches:
- main
jobs:
build-and-push-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/your-repo-name:latest
ghcr.io/${{ github.repository_owner }}/your-repo-name:${{ github.sha }}
generate-changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Generate changelog with conventional commits
id: changelog
uses: conventional-changelog/action@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
preset: conventionalcommits
output-file: CHANGELOG.md
- name: Commit changelog
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git add CHANGELOG.md
git commit -m "chore: Update changelog"
git push
create-release:
runs-on: ubuntu-latest
needs: [build-and-push-docker, generate-changelog]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Create GitHub release
id: create-release
uses: actions/create-release@v1
with:
tag_name: v1.0.0-${{ github.sha }}
release_name: Release v1.0.0-${{ github.sha }}
body: ${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}