Skip to content

Merge hotfix/fix-1 into main #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
32 changes: 32 additions & 0 deletions .github/workflows/auto-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Create production promotion pull request

on:
push:
branches:
- 'hotfix/*' # Trigger for hotfix branches
workflow_dispatch:

jobs:
promote-hotfix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify if PR already open
id: pr-check
env:
GH_TOKEN: ${{ secrets.PAT }}
run: |
prs_list=$(gh pr list --search "${{ github.ref_name }}")
echo "${prs_list}"
if [ -n "$prs_list" ]; then
echo "PR already opened"
echo "pr_exists=true" >> $GITHUB_OUTPUT # Using GITHUB_OUTPUT for setting output
else
echo "pr_exists=false" >> $GITHUB_OUTPUT # Using GITHUB_OUTPUT for setting output
fi

- name: Create pull request
if: steps.pr-check.outputs.pr_exists == 'false' # Only run if no PR exists
run: gh pr create -B main -H ${{ github.ref_name }} --title 'Merge ${{ github.ref_name }} into main' --body 'Created by Github action'
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.env
.env
.DS_Store
1 change: 1 addition & 0 deletions go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
)

func main() {
fmt.Println("sera que vai abrir outro PR??????? hotfix 1")
godotenv.Load("./.env")
fmt.Println(os.Getenv("TEST_ENV_FILE_VAR"))
}
Loading