setting up builds
Some checks failed
Build Container / Build Container (push) Failing after 2s
Build Container / Git Tag (push) Failing after 2s

This commit is contained in:
Zakary Timson 2025-04-17 11:05:58 -04:00
parent be145d538a
commit 969ccb88f8
2 changed files with 5 additions and 5 deletions

View File

@ -12,9 +12,9 @@ jobs:
steps: steps:
- name: Build Container - name: Build Container
run: | 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://%% )" 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 docker login -u ${{github.repository_owner}} -p ${{secrets.DEPLOY_TOKEN}} $REGISTRY
@ -36,8 +36,8 @@ jobs:
steps: steps:
- name: Git Tag - name: Git Tag
run: | 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" .
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\-\.]+)?')"
git tag -f $VERSION ${{github.sha}} git tag -f $VERSION ${{github.sha}}
git push -f origin $VERSION git push -f origin $VERSION

View File

@ -1,6 +1,6 @@
{ {
"name": "stock-exporter", "name": "stock-exporter",
"version": "1.0.0", "version": "1.0.0-rc.0",
"description": "Export stock prices to prometheus", "description": "Export stock prices to prometheus",
"main": "main.ts", "main": "main.ts",
"scripts": { "scripts": {