diff --git a/.forgejo/actions/set-image-name/action.yml b/.forgejo/actions/set-image-name/action.yml new file mode 100644 index 0000000..d2ae386 --- /dev/null +++ b/.forgejo/actions/set-image-name/action.yml @@ -0,0 +1,17 @@ +name: Forgejo Set Image Name +description: Define IMAGE_NAME to Git Hub env, based on repository name +runs: + using: composite + steps: + - name: Set Image Name + shell: sh + run: | + export REPO_FULL=${{ github.repository }} + export REPO_NAME=${REPO_FULL#*/} + + if [ "${{ github.ref_name }}" != "master" ]; then + export IMAGE_NAME=${{ secrets.DOCKER_HUB_USERNAME }}/$REPO_NAME-dev + else + export IMAGE_NAME=${{ secrets.DOCKER_HUB_USERNAME }}/$REPO_NAME + fi + echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_ENV diff --git a/.forgejo/workflows/mirror.yml b/.forgejo/workflows/mirror.yml deleted file mode 100644 index b7f2b6d..0000000 --- a/.forgejo/workflows/mirror.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Reusable Mirror Workflow - -on: - workflow_call: - inputs: - remote_url: - required: true - type: string - force: - required: false - type: boolean - default: false - -jobs: - push: - runs-on: docker - container: - image: node:20-alpine - steps: - - name: Instalando dependencias - run: | - apk add git - - - name: Checkout código - uses: actions/checkout@v4 - with: - fetch-depth: 0 # ✅ clone completo - - - name: Push branch atual - run: | - git remote add mirror ${{ inputs.remote_url }} - if [ "${{ inputs.force }}" = "true" ]; then - git push --force mirror HEAD - else - git push mirror HEAD - fi diff --git a/.forgejo/workflows/test.yaml b/.forgejo/workflows/test.yaml deleted file mode 100644 index 30ab182..0000000 --- a/.forgejo/workflows/test.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: Test SSH Workflow - -on: - push: - branches: - - main - - development - workflow_dispatch: - -jobs: - exec-command: - runs-on: docker - container: - image: ubuntu:latest - steps: - - name: Instalando dependências - run: | - apt update - apt install -y openssh-client - - name: Comando remoto via SSH - run: | - ls -lha ~/.ssh - ssh -o StrictHostKeyChecking=no root@172.233.17.72 -t 'w'