diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ea619ca..cff8c08 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,9 +12,9 @@ jobs: steps: - name: Build Container run: | - git clone -b "${{github.ref_name}}" "$(echo ${{github.server_url}}/${{github.repository}}.git | sed s%://%://${{github.token}}@% )" . + git clone -b "${{github.ref_name}}" "https://${{github.token}}@${{github.server_url}}/${{github.repository}}.git" . REGISTRY="$(echo ${{github.server_url}} | sed s%http://%% | sed s%https://%% )" - VERSION="$(cat Dockerfile | grep "ARG CADDY_VERSION" | grep -Eo '=.+' | grep -Eo '[[:alnum:]\.\/\-]+')" + VERSION="$(cat package.json | grep 'version' | grep -Eo '([0-9]+\.?)+(-[0-9a-zA-Z\-\.]+)?')" docker login -u ${{github.repository_owner}} -p ${{secrets.DEPLOY_TOKEN}} $REGISTRY @@ -36,8 +36,8 @@ jobs: steps: - name: Git Tag run: | - git clone -b "${{github.ref_name}}" "$(echo ${{github.server_url}}/${{github.repository}}.git | sed s%://%://${{github.token}}@% )" . - VERSION="$(cat Dockerfile | grep "ARG CADDY_VERSION" | grep -Eo '=.+' | grep -Eo '[[:alnum:]\.\/\-]+')" + git clone -b "${{github.ref_name}}" "https://${{github.token}}@${{github.server_url}}/${{github.repository}}.git" . + VERSION="$(cat package.json | grep 'version' | grep -Eo '([0-9]+\.?)+(-[0-9a-zA-Z\-\.]+)?')" git tag -f $VERSION ${{github.sha}} git push -f origin $VERSION diff --git a/package.json b/package.json index 55e3ffb..43efed8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stock-exporter", - "version": "1.0.0", + "version": "1.0.0-rc.0", "description": "Export stock prices to prometheus", "main": "main.ts", "scripts": {