Skip to content

Smoke Test (Released Action) #51

Smoke Test (Released Action)

Smoke Test (Released Action) #51

Workflow file for this run

name: Example Workflow using Go Git Commit Action
on:
workflow_dispatch:
inputs:
run:
description: 'workflow run'
required: true
default: 'true'
workflow_run:
workflows: ["Generate changelog"]
types:
- completed
permissions:
contents: write
jobs:
acton-module-tag-reference:
name: acton-module-tag-reference
runs-on: ubuntu-latest
steps:
- name: Checkout infrastructure repository
uses: actions/checkout@v6
- name: Create Test File
run: |
echo "$(date +%s)-$RANDOM" > test/test1.txt
- name: Commit to repository
uses: somaz94/go-git-commit-action@v1
with:
user_email: actions@github.com
user_name: GitHub Actions
commit_message: test1 ${{ github.run_id }}!
branch: test
repository_path: test
file_pattern: .
tag_name: test1-${{ github.run_id }}
tag_message: test1 ${{ github.run_id }}
tag_reference: v1.0.1
# pr_labels: "test,automated,tag-reference-test"
github_token: ${{ secrets.PAT_TOKEN }}
- name: Confirm Tag Reference
run: |
git show -1 v1.0.1
git show -1 test1-${{ github.run_id }}
- name: Delete Tag
uses: somaz94/go-git-commit-action@v1
with:
user_email: actions@github.com
user_name: GitHub Actions
tag_name: test1-${{ github.run_id }}
delete_tag: true
github_token: ${{ secrets.PAT_TOKEN }}
acton-module-auto-branch-false:
name: acton-module-auto-branch-false
needs: [acton-module-tag-reference]
runs-on: ubuntu-latest
steps:
- name: Checkout infrastructure repository
uses: actions/checkout@v6
- name: Commit to repository
uses: somaz94/go-git-commit-action@v1
with:
user_email: actions@github.com
user_name: GitHub Actions
branch: test
create_pr: true
auto_branch: false
pr_title: test-to-main-pr-title
pr_base: main
pr_branch: test
repository_path: test
file_pattern: .
github_token: ${{ secrets.PAT_TOKEN }}
pr_labels: "test,automated,auto-branch-false-test"
acton-module-auto-branch-true:
name: acton-module-auto-branch-true
needs: [acton-module-auto-branch-false]
runs-on: ubuntu-latest
steps:
- name: Checkout infrastructure repository
uses: actions/checkout@v6
- name: Commit to repository
uses: somaz94/go-git-commit-action@v1
with:
user_email: actions@github.com
user_name: GitHub Actions
branch: test
create_pr: true
auto_branch: true
pr_base: main
repository_path: test
file_pattern: .
delete_source_branch: true
github_token: ${{ secrets.PAT_TOKEN }}
pr_labels: "test,automated,auto-branch-true-test"
test-skip-if-empty:
name: Test Skip If Empty
runs-on: ubuntu-latest
needs: [acton-module-auto-branch-true]
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 10
- name: Test Skip If Empty (should skip)
uses: somaz94/go-git-commit-action@v1
with:
user_email: actions@github.com
user_name: GitHub Actions
branch: main
pr_branch: main
create_pr: true
pr_base: main
repository_path: test
file_pattern: .
skip_if_empty: true
pr_title: "Test Skip If Empty - With Changes (should skip)"
pr_labels: "test,automated,skip-if-empty-test"
github_token: ${{ secrets.PAT_TOKEN }}
# 변경사항이 있을 때는 skip되지 않는지 확인
- name: Test Skip If Empty (should not skip)
uses: somaz94/go-git-commit-action@v1
with:
user_email: actions@github.com
user_name: GitHub Actions
branch: test
create_pr: true
auto_branch: true
pr_base: main
repository_path: test
file_pattern: .
skip_if_empty: true
delete_source_branch: true
pr_title: "Test Skip If Empty - With Changes (should not skip)"
pr_labels: "test,automated,skip-if-empty-test"
github_token: ${{ secrets.PAT_TOKEN }}
test-pr-auto-close-pr-body:
name: Test PR Auto Close
runs-on: ubuntu-latest
needs: [test-skip-if-empty]
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 10
- name: Test PR Auto Close
uses: somaz94/go-git-commit-action@v1
with:
user_email: actions@github.com
user_name: GitHub Actions
branch: test
pr_branch: test
create_pr: true
pr_base: main
repository_path: test
file_pattern: .
pr_closed: true
pr_title: "Test Auto Close PR"
pr_labels: "test,automated,auto-close-pr-body-test"
pr_body: |
## Test Auto Close PR
This PR will be automatically closed after creation.
github_token: ${{ secrets.PAT_TOKEN }}
test-pr-dry-run:
name: Test PR Dry Run
runs-on: ubuntu-latest
needs: [test-pr-auto-close-pr-body]
# needs: [test-multi-file-pattern]
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 10
token: ${{ secrets.PAT_TOKEN }}
# - name: Create Test File for PR and Add to Git
# run: |
# mkdir -p test
# echo "Test file for PR dry run - $(date +%s)" > test/pr-dry-run-test.txt
# # 파일 확인
# echo "생성된 PR 테스트 파일:"
# ls -la test/
# # 경로 돌아가기
# cd ../..
- name: Test PR Dry Run (auto_branch false)
uses: somaz94/go-git-commit-action@v1
with:
user_email: actions@github.com
user_name: GitHub Actions
branch: main
create_pr: true
auto_branch: false
pr_title: "Test PR Dry Run"
pr_base: test
pr_branch: main
pr_labels: "test,automated,dry-run-test"
repository_path: "test"
file_pattern: "pr-dry-run-test.txt"
github_token: ${{ secrets.PAT_TOKEN }}
pr_dry_run: true