Skip to content
28 changes: 28 additions & 0 deletions .github/workflows/auto-pr-hotfix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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
with:
fetch-depth: 0

- name: Merge the hotfix inside main branch
run: |
git checkout main
git merge ${{ github.ref_name }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
branch: promote-${{ github.ref_name }}
commit-message: "Promote: Merge changes from ${{ github.ref_name }} to main"
title: "[Promote] Hotfix: Merge ${{ github.ref_name }} to main (manual merge required)"
body: "This PR merges branch ${{ github.ref_name }} into main. Please review and merge manually."
4 changes: 0 additions & 4 deletions .github/workflows/create-env-file.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Create envfile

on:
push:
branches: [ "main", "develop" ]
pull_request:
branches: [ "main", "develop" ]
workflow_dispatch:

jobs:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/vars.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Learn about env vars

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
Expand Down
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("Doing hotfix to test blah blah blah")
godotenv.Load("./.env")
fmt.Println(os.Getenv("TEST_ENV_FILE_VAR"))
}
7 changes: 7 additions & 0 deletions go/new-file.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "fmt"

func Blah() {
fmt.Println("Test another commit to see if the PR is going to be updated")
}