Skip to content

fix(workflow): swap outputs from clean_changelog to changelog #28

fix(workflow): swap outputs from clean_changelog to changelog

fix(workflow): swap outputs from clean_changelog to changelog #28

Workflow file for this run

---
name: Release
on:
push:
tags:
- v[0-9]+.*
pull_request:
branches: [main,issue-*,dev-*]
types:
- closed
workflow_dispatch:
permissions:
packages: write
contents: write
jobs:
release:
name: Release
permissions:
contents: write
issues: write
pull-requests: write
packages: write
runs-on: [ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v5
with:
github-token: ${{ secrets.CHANGELOG_TOKEN }}
git-message: 'chore(release): {version}'
tag-prefix: 'v'
# skip-git-pull: "true"
skip-on-empty: "true"
output-file: "CHANGELOG.md"
version-file: ./package.json
preset: 'angular'
release-count: 0
# - name: Create Release
# uses: actions/create-release@v1
# if: ${{ steps.changelog.outputs.skipped == 'false' }}
# env:
# GITHUB_TOKEN: ${{ secrets.github_token }}
# with:
# tag_name: ${{ steps.changelog.outputs.tag }}
# release_name: ${{ steps.changelog.outputs.tag }}
# body: ${{ steps.changelog.outputs.clean_changelog }}
- name: Create Release
uses: softprops/action-gh-release@v2
if: ${{ steps.changelog.outputs.skipped == 'false' }}
with:
token: ${{ secrets.CHANGELOG_TOKEN }}
tag_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.changelog }}
files: |
./CHANGELOG.md
image:
runs-on: [ubuntu-latest]
needs: [release]
permissions:
contents: write
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
gorabbit/node-app
# ghcr.io/jacekzubielik/node-app
tags: |
type=semver,pattern={{version}}
type=ref,event=branch
type=ref,event=pr
# type=sha
# type=schedule
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index,manifest-descriptor,index-descriptor
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GHCR_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
tags: ${{ steps.meta.outputs.tags }}
annotations: ${{ steps.meta.outputs.annotations }}
platforms: linux/amd64
labels: ${{ steps.meta.outputs.labels }}
push: true # ${{ github.event_name != 'pull_request' }}
outputs: |
type=image,name=target
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: gorabbit/node-app
readme-filepath: ./README.md