Skip to content

fix: issue/1 entrypoint.sh #20

fix: issue/1 entrypoint.sh

fix: issue/1 entrypoint.sh #20

Workflow file for this run

name: Semantic-Version
on:
push:
branches:
- main
- feat/issue/1
pull_request:
branches: [ main ]
env:
REPO_USER: 'jpradoar'
REPO_APP: 'ga-semanticversion'
jobs:
Semantic-Version:
runs-on: ubuntu-latest
steps:
- name: Checkout del repositorio
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Show last version of docker-hub image
id: last_version_remote_file
run: |
LastVersion=$(curl -s "https://hub.docker.com/v2/repositories/jpradoar/${{ env.REPO_APP }}/tags/?page_size=2" | jq -r '.results[].name'|sort -M|grep -v latest|tail -1)
echo "LAST_VERSION=$LastVersion " >> "$GITHUB_OUTPUT"
- name: Generate new version with local file
uses: jpradoar/[email protected]
with:
COMMIT_MSG: ${{ github.event.head_commit.message }}
VERSION: ${{ steps.last_version_local_file.outputs.LAST_VERSION }}
- name: Show last version of docker-hub image
id: last_version_remote_file

Check failure on line 45 in .github/workflows/main.yaml

View workflow run for this annotation

GitHub Actions / Semantic-Version

Invalid workflow file

The workflow is not valid. .github/workflows/main.yaml (Line: 45, Col: 13): The identifier 'last_version_remote_file' may not be used more than once within the same scope.
run: |
LastVersion=$(curl -s "https://hub.docker.com/v2/repositories/jpradoar/${{ env.REPO_APP }}/tags/?page_size=1" | jq -r '.results[].name'|sort -M|grep -v latest)
echo "LAST_VERSION=$LastVersion " >> "$GITHUB_OUTPUT"
- name: Generate new version with semantic version
id: nversion
uses: jpradoar/[email protected]
with:
COMMIT_MSG: ${{ github.event.head_commit.message }}
VERSION: ${{ steps.last_version_remote_file.outputs.LAST_VERSION }}
- name: Show new version
run: echo "New version ${{ steps.nversion.outputs.NEW_VERSION }}"