Skip to content

fix: issue/1 entrypoint.sh #22

fix: issue/1 entrypoint.sh

fix: issue/1 entrypoint.sh #22

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/${{ env.REPO_USER }}/${{ 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 new version
run: echo "New version ${{ steps.nversion.outputs.NEW_VERSION }}"