Skip to content

Commit 53a0fde

Browse files
authored
Merge pull request #4 from konami12/tmp-2-init
feat(actions): configuraciones para borrar ramas despues de un PR
2 parents f81c071 + 1a5cc15 commit 53a0fde

5 files changed

Lines changed: 59 additions & 6 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "Delete Branch"
2+
description: "Permite borrar una rama especifica del repositorio"
3+
inputs:
4+
branchToDelete:
5+
description: "Rama que sera eliminada"
6+
required: true
7+
baseBranch:
8+
description: "Rama base del repositorio"
9+
required: true
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: Borrando rama
14+
shell: bash
15+
run: |
16+
git checkout ${{ inputs.baseBranch }}
17+
git fetch; git pull
18+
echo "Pasando a la rama base: ${{ inputs.baseBranch }}"
19+
echo "Borrando rama: ${{ inputs.branchToDelete }}"
20+
git push origin --delete ${{ inputs.branchToDelete }}

.github/workflows/auto-release-beta.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
- name: ✏️ CONFIGURACIONES PARA FIRMAR COMMITS
2020
uses: ./.github/actions/git-config
2121
with:
22-
username: "Jmendez-Bot"
23-
email: "jorge.mendez.ortega@gmail.com"
22+
username: ${{ secrets.USER }}
23+
email: ${{ secrets.EMAIL }}
2424

2525
- name: 📝 CREANDO RELEASE
2626
uses: ./.github/actions/set-release

.github/workflows/auto-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
- name: ✏️ CONFIGURACIONES PARA FIRMAR COMMITS
2020
uses: ./.github/actions/git-config
2121
with:
22-
username: "Jmendez-Bot"
23-
email: "jorge.mendez.ortega@gmail.com"
22+
username: ${{ secrets.USER }}
23+
email: ${{ secrets.EMAIL }}
2424

2525
- name: 📝 CREANDO RELEASE
2626
uses: ./.github/actions/set-release
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: cleanup-merged-branch
2+
description: "Elimina ramas que han sido mergeadas a develop"
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
types:
8+
- closed
9+
jobs:
10+
delete-merged-branch:
11+
if: github.event.pull_request.merged == true
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
token: ${{ secrets.GITHUB_TOKEN }}
18+
- name: ✏️ CONFIGURACIONES PARA FIRMAR COMMITS
19+
uses: ./.github/actions/git-config
20+
with:
21+
username: ${{ secrets.USER }}
22+
email: ${{ secrets.EMAIL }}
23+
- name: 🗑 BORRANDO RAMA DEL ULTIMO MERGE
24+
uses: ./.github/actions/set-delete-branch
25+
with:
26+
branchToDelete: ${{ github.event.pull_request.head.ref }}
27+
baseBranch: develop

.github/workflows/create-label.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020
- name: ✏️ CONFIGURACIONES PARA FIRMAR COMMITS
2121
uses: ./.github/actions/git-config
2222
with:
23-
username: "Jmendez-Bot"
24-
email: "jorge.mendez.ortega@gmail.com"
23+
username: ${{ secrets.USER }}
24+
email: ${{ secrets.EMAIL }}
2525

2626
- name: 🔖 CREANDO ETIQUETAS
2727
uses: ./.github/actions/set-labels
@@ -50,3 +50,9 @@ jobs:
5050
defaultBranch: develop
5151
token: ${{ secrets.MY_TOKEN }}
5252
repo: ${{ github.repository }}
53+
54+
- name: 🗑 BORRANDO RAMA INICIAL
55+
uses: ./.github/actions/set-delete-branch
56+
with:
57+
branchToDelete: init
58+
baseBranch: develop

0 commit comments

Comments
 (0)