feat: prefixing with action name

This commit is contained in:
Leandro Costa 2025-07-11 12:44:26 -03:00
parent 497d109b44
commit 327ab1e92c
6 changed files with 22 additions and 22 deletions

View file

@ -10,12 +10,12 @@ inputs:
runs: runs:
using: composite using: composite
steps: steps:
- name: Set Image Name - name: Build-Docker Set Image Name
uses: https://git.lhprovedor.com.br/leandro/devops/.forgejo/actions/set-image-name@main uses: https://git.lhprovedor.com.br/leandro/devops/.forgejo/actions/set-image-name@main
with: with:
username: ${{ inputs.username }} username: ${{ inputs.username }}
- name: Build Docker Image - name: Build-Docker Build Docker Image
uses: https://git.lhprovedor.com.br/leandro/forgejo-kaniko-action@v2 uses: https://git.lhprovedor.com.br/leandro/forgejo-kaniko-action@v2
with: with:
image: ${{ inputs.username }}/${{ env.IMAGE_NAME }}:${{ github.sha }},${{ inputs.username }}/${{ env.IMAGE_NAME }}:latest image: ${{ inputs.username }}/${{ env.IMAGE_NAME }}:${{ github.sha }},${{ inputs.username }}/${{ env.IMAGE_NAME }}:latest

View file

@ -25,14 +25,14 @@ inputs:
runs: runs:
using: composite using: composite
steps: steps:
- name: Install dependencies - name: Build-Node-App Install dependencies
shell: sh shell: sh
run: apk add nodejs run: apk add nodejs
- name: Git Clone - name: Build-Node-App_Git Clone
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Restore Node Modules Cache - name: Build-Node-App Restore Node Modules Cache
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: ~/.npm path: ~/.npm
@ -40,7 +40,7 @@ runs:
restore-keys: | restore-keys: |
${{ runner.os }}-nodejs- ${{ runner.os }}-nodejs-
- name: Build and Test - name: Build-Node-App Build and Test
shell: sh shell: sh
run: | run: |
npm install npm install
@ -48,7 +48,7 @@ runs:
npm run ${{ inputs.build_action }} npm run ${{ inputs.build_action }}
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
name: Upload Artifact name: Build-Node-App Upload Artifact
with: with:
name: ${{ inputs.artifact_name }} name: ${{ inputs.artifact_name }}
path: ${{ inputs.build_path }} path: ${{ inputs.build_path }}

View file

@ -17,16 +17,16 @@ outputs:
runs: runs:
using: composite using: composite
steps: steps:
- name: Instalando Dependencias - name: Check-Package-Version Instalando Dependencias
shell: sh shell: sh
run: apk add git jq run: apk add git jq
- name: Checkout do repositório - name: Check-Package-Version Checkout do repositório
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 2 # Necessário para acessar o commit anterior fetch-depth: 2 # Necessário para acessar o commit anterior
- name: Verificar mudança de versão no package.json - name: Check-Package-Version Verificar mudança de versão no package.json
id: check-package-version id: check-package-version
shell: sh shell: sh
run: | run: |

View file

@ -15,21 +15,21 @@ inputs:
runs: runs:
using: composite using: composite
steps: steps:
- name: Install dependencies - name: Deploy-Docker Install dependencies
shell: sh shell: sh
run: apk add openssh curl run: apk add openssh curl
- name: Configure SSH - name: Deploy-Docker Configure SSH
uses: webfactory/ssh-agent@v0.9.0 uses: webfactory/ssh-agent@v0.9.0
with: with:
ssh-private-key: ${{ inputs.ssh-private-key }} ssh-private-key: ${{ inputs.ssh-private-key }}
- name: Configure Staging Server - name: Deploy-Docker Configure Staging Server
if: github.ref == 'refs/heads/development' if: github.ref == 'refs/heads/development'
shell: sh shell: sh
run: echo ${{ inputs.staging-server }} > servidores.lst run: echo ${{ inputs.staging-server }} > servidores.lst
- name: Configure Production Servers - name: Deploy-Docker Configure Production Servers
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
shell: sh shell: sh
run: | run: |
@ -37,12 +37,12 @@ runs:
echo "Leandro Servidores: $SERVIDORES" echo "Leandro Servidores: $SERVIDORES"
echo $SERVIDORES >> servidores.lst echo $SERVIDORES >> servidores.lst
- name: Set Image Name - name: Deploy-Docker Set Image Name
uses: https://git.lhprovedor.com.br/leandro/devops/.forgejo/actions/set-image-name@main uses: https://git.lhprovedor.com.br/leandro/devops/.forgejo/actions/set-image-name@main
with: with:
username: ${{ inputs.username }} username: ${{ inputs.username }}
- name: deploy - name: Deploy-Docker deploy
shell: sh shell: sh
run: | run: |
for i in `cat servidores.lst`; do for i in `cat servidores.lst`; do

View file

@ -31,11 +31,11 @@ outputs:
runs: runs:
using: composite using: composite
steps: steps:
- name: Instalando Dependencias - name: Public-Npm-Package Instalando Dependencias
shell: sh shell: sh
run: apk add git jq sed run: apk add git jq sed
- name: Download Artifact - name: Public-Npm-Package Download Artifact
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
path: ${{ inputs.artifact_folder_name }} path: ${{ inputs.artifact_folder_name }}
@ -46,7 +46,7 @@ runs:
shell: sh shell: sh
run: sed -i "s/-dev//g" dist/package.json run: sed -i "s/-dev//g" dist/package.json
- name: Lê o nome do pacote - name: Public-Npm-Package Lê o nome do pacote
shell: sh shell: sh
run: | run: |
PACKAGE_NAME=$(jq -r .name dist/package.json) PACKAGE_NAME=$(jq -r .name dist/package.json)
@ -58,7 +58,7 @@ runs:
echo "PACKAGE_NAME=$PACKAGE_NAME" >> "$GITHUB_ENV" echo "PACKAGE_NAME=$PACKAGE_NAME" >> "$GITHUB_ENV"
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> "$GITHUB_ENV" echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> "$GITHUB_ENV"
- name: Publish to NPM.js - name: Public-Npm-Package Publish to NPM.js
shell: sh shell: sh
run: | run: |
cd dist cd dist
@ -73,7 +73,7 @@ runs:
cd .. cd ..
- name: Publish to Git Packages - name: Public-Npm-Package Publish to Git Packages
shell: sh shell: sh
run: | run: |
echo "Git url: ${{ inputs.git_url }}" echo "Git url: ${{ inputs.git_url }}"

View file

@ -7,7 +7,7 @@ inputs:
runs: runs:
using: composite using: composite
steps: steps:
- name: Set Image Name - name: Set-Image-Name Set Image Name
shell: sh shell: sh
run: | run: |
export REPO_FULL=${{ github.repository }} export REPO_FULL=${{ github.repository }}