Skip to content

Commit

Permalink
Added: Auto-checkout option to changelog generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sewer56 committed Jun 23, 2024
1 parent 4f32c6f commit 95e1d8f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 21 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/test-changelog-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Test Default Parameters
uses: Reloaded-Project/devops-changelog@v1
- name: Assert Changelog File Existence
Expand All @@ -51,10 +47,6 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Test Custom Parameters
uses: Reloaded-Project/devops-changelog@v1
with:
Expand All @@ -81,10 +73,6 @@ jobs:
test-upload-artifact:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate Changelog
uses: Reloaded-Project/devops-changelog@v1
with:
Expand All @@ -104,10 +92,6 @@ jobs:
test-custom-artifact-name:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate Changelog
uses: Reloaded-Project/devops-changelog@v1
with:
Expand Down
7 changes: 2 additions & 5 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ jobs:
contents: write

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0

# Checkout is automatic
- name: Generate Changelog
uses: Reloaded-Project/devops-changelog@v1
with:
Expand Down Expand Up @@ -109,6 +105,7 @@ And the following parameters are specific to this workflow.

| Input | Required | Default | Description |
| --------------------------- | -------- | ----------- | ------------------------------------------------------------------------------ |
| `auto-checkout` | No | `true` | Performs automatic checkout of current repository. |
| `upload-artifact` | No | `false` | Upload the generated changelog as an artifact |
| `artifact-name` | No | `Changelog` | Name of the artifact for the uploaded changelog. |
| `upload-release` | No | `false` | Upload the generated changelog to GitHub Releases |
Expand Down
10 changes: 10 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,20 @@ inputs:
required: false
default: "Changelog"
description: "Override the artifact name for the changelog"
auto-checkout:
required: false
default: 'true'
description: "Automatically checks out the current repository"

runs:
using: "composite"
steps:
- name: Checkout code
uses: actions/checkout@v4
if: ${{ inputs.auto-checkout == 'true' }}
with:
fetch-depth: 0

- name: Install auto-changelog
run: npm install -g auto-changelog
shell: bash
Expand Down

0 comments on commit 95e1d8f

Please sign in to comment.