setting up builds
This commit is contained in:
parent
be145d538a
commit
969ccb88f8
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@ -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
|
||||||
|
@ -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": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user