Compare commits

83 Commits

Author SHA1 Message Date
559b854f02 Update .github/workflows/CI.yml
All checks were successful
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m27s
Build and Push Docker Image / build-and-push (push) Successful in 10m26s
2025-05-21 14:15:24 -04:00
f1d2410857 Some API fixes
All checks were successful
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m40s
Build and Push Docker Image / build-and-push (push) Successful in 10m29s
2025-04-30 18:53:12 -04:00
d01e6a050f Added an API listener
All checks were successful
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 2m30s
Build and Push Docker Image / build-and-push (push) Successful in 11m56s
2025-04-30 18:34:57 -04:00
1475c7911f Updated CI.yml and CD.yml
All checks were successful
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m9s
Build and Push Docker Image / build-and-push (push) Successful in 10m24s
2025-04-29 22:47:34 -04:00
af9dee255c Update .github/workflows/CD.yml
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Has been cancelled
2025-04-29 16:49:18 -04:00
ef3fc3987a Update .github/workflows/CI.yml
Some checks failed
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m10s
Build and Push Docker Image / build-and-push (push) Has been cancelled
2025-04-29 16:46:43 -04:00
9058e3c6fc Update .github/workflows/CD.yml
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Has been cancelled
2025-04-29 16:46:21 -04:00
6b87fde7d1 Update .github/workflows/CD.yml
All checks were successful
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m8s
Build and Push Docker Image / build-and-push (push) Successful in 10m24s
2025-04-29 16:25:11 -04:00
e27ac12296 Delete .github/workflows/gha-testing.yml
All checks were successful
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m33s
Build and Push Docker Image / build-and-push (push) Successful in 10m26s
2025-04-29 15:53:44 -04:00
41909503fa Update .github/workflows/CD.yml
Some checks failed
GHA Testing / gha-testing (push) Successful in 2s
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m8s
Build and Push Docker Image / build-and-push (push) Has been cancelled
2025-04-29 15:50:16 -04:00
3fb9332e10 Update .github/workflows/CI.yml
Some checks failed
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m23s
GHA Testing / gha-testing (push) Successful in 2s
Build and Push Docker Image / build-and-push (push) Has been cancelled
2025-04-29 15:37:40 -04:00
b6a6ca589c Update .github/workflows/CI.yml
All checks were successful
GHA Testing / gha-testing (push) Successful in 2s
Build and Push Docker Image / build-and-push (push) Successful in 10m25s
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m59s
2025-04-29 15:16:48 -04:00
a152670456 Update .github/workflows/CI.yml
All checks were successful
GHA Testing / gha-testing (push) Successful in 2s
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m30s
Build and Push Docker Image / build-and-push (push) Successful in 10m53s
2025-04-29 14:37:04 -04:00
0db3ab00d2 Update .github/workflows/CI.yml
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled
GHA Testing / gha-testing (push) Successful in 3s
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m10s
2025-04-29 14:27:53 -04:00
fc56a2ea9e Update .github/workflows/CI.yml
All checks were successful
GHA Testing / gha-testing (push) Successful in 2s
Build and Push Docker Image / build-and-push (push) Successful in 10m25s
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m15s
2025-04-29 14:10:54 -04:00
20b90ebbcd Update .github/workflows/CI.yml
Some checks failed
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m34s
GHA Testing / gha-testing (push) Successful in 2s
Build and Push Docker Image / build-and-push (push) Failing after 9m16s
2025-04-29 13:58:52 -04:00
58719e8495 Update .github/workflows/CI.yml
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled
GHA Testing / gha-testing (push) Successful in 2s
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m18s
2025-04-29 13:53:59 -04:00
26dec18f85 Update .github/workflows/CI.yml
Some checks failed
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m6s
GHA Testing / gha-testing (push) Successful in 2s
Build and Push Docker Image / build-and-push (push) Has been cancelled
2025-04-29 13:44:55 -04:00
910381666e Update .github/workflows/CI.yml
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 3s
GHA Testing / gha-testing (push) Successful in 3s
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m6s
2025-04-29 13:36:38 -04:00
481835276f Update .github/workflows/CI.yml
Some checks failed
GHA Testing / gha-testing (push) Successful in 2s
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m11s
Build and Push Docker Image / build-and-push (push) Failing after 4s
2025-04-29 13:27:35 -04:00
8294758bb6 Update .github/workflows/CI.yml
Some checks failed
GHA Testing / gha-testing (push) Successful in 3s
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 2m4s
Build and Push Docker Image / build-and-push (push) Failing after 9m17s
2025-04-29 13:11:23 -04:00
82d1328f8f Update .github/workflows/CI.yml
Some checks failed
GHA Testing / gha-testing (push) Successful in 2s
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m0s
Build and Push Docker Image / build-and-push (push) Failing after 9m24s
2025-04-29 12:57:26 -04:00
7ec2ab1102 Update .github/workflows/CI.yml
All checks were successful
GHA Testing / gha-testing (push) Successful in 2s
2025-04-29 12:54:07 -04:00
c2c1ec925a Update .github/workflows/CI.yml
All checks were successful
GHA Testing / gha-testing (push) Successful in 2s
2025-04-29 12:53:31 -04:00
b7dcaca6cc Update .github/workflows/CI.yml
All checks were successful
GHA Testing / gha-testing (push) Successful in 2s
2025-04-29 12:52:04 -04:00
6b0f6948d2 Update .github/workflows/CI.yml
All checks were successful
GHA Testing / gha-testing (push) Successful in 2s
2025-04-29 12:49:17 -04:00
b627fcf3d9 Update .github/workflows/gha-testing.yml
Some checks failed
GHA Testing / gha-testing (push) Successful in 2s
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m8s
Build and Push Docker Image / build-and-push (push) Failing after 4s
2025-04-29 12:26:30 -04:00
6a42857c8c Update .github/workflows/CI.yml
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 6s
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m7s
2025-04-29 12:19:09 -04:00
00ed8b2907 Update .github/workflows/CD.yml
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 5s
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m23s
2025-04-29 12:18:58 -04:00
14136a1e26 Update .github/workflows/CI.yml
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been cancelled
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Has been cancelled
2025-04-29 12:18:38 -04:00
c289808993 Delete .github/workflows/testing.yml
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 5s
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m14s
2025-04-29 12:18:16 -04:00
769828c98a Update .github/workflows/build.yml
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 5s
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m38s
Testing / test (1.24.x, ubuntu-latest) (push) Successful in 1m33s
2025-04-29 12:16:32 -04:00
737b0c2c87 Update .github/workflows/build.yml
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 5s
Testing / test (1.24.x, ubuntu-latest) (push) Successful in 1m39s
Build and Push Docker Image / testing (1.24.x, ubuntu-latest) (push) Successful in 1m45s
2025-04-29 12:13:56 -04:00
60e1a2c7f4 Update .github/workflows/gha-testing.yml
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 4s
Testing / test (1.24.x, ubuntu-latest) (push) Successful in 1m3s
2025-04-28 19:53:28 -04:00
31530c2f3b Update .github/workflows/gha-testing.yml
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 4s
Testing / test (1.24.x, ubuntu-latest) (push) Has been cancelled
2025-04-28 19:51:43 -04:00
f1bd836a0a Add .github/workflows/gha-testing.yml
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 4s
Testing / test (1.24.x, ubuntu-latest) (push) Successful in 1m5s
2025-04-28 19:46:48 -04:00
b8b4771e04 Update .github/workflows/build.yml
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 4s
Testing / test (1.24.x, ubuntu-latest) (push) Successful in 59s
2025-04-28 15:48:13 -04:00
e6b1935fb0 Update .github/workflows/build.yml
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 5s
Testing / test (1.24.x, ubuntu-latest) (push) Successful in 57s
2025-04-28 15:46:30 -04:00
d64727a6d5 Update .github/workflows/build.yml
All checks were successful
Testing / test (1.24.x, ubuntu-latest) (push) Successful in 1m12s
2025-04-28 15:39:43 -04:00
918ca14eca Update .github/workflows/deploy.yml
All checks were successful
Testing / test (1.24.x, ubuntu-latest) (push) Successful in 58s
2025-04-28 12:33:52 -04:00
d0016b9a9b Update .github/workflows/deploy.yml
All checks were successful
Testing / test (1.24.x, ubuntu-latest) (push) Successful in 1m0s
2025-04-28 12:12:49 -04:00
75172b995c Update .github/workflows/deploy.yml
All checks were successful
Testing / test (1.24.x, ubuntu-latest) (push) Successful in 1m30s
2025-04-28 01:02:49 -04:00
fe09039377 Update .github/workflows/testing.yml
Some checks failed
Testing / test (1.24.x, ubuntu-latest) (push) Has been cancelled
2025-04-28 01:02:28 -04:00
5154f87d53 Update .github/workflows/testing.yml
Some checks failed
Testing / test (1.24.x, ubuntu-latest) (push) Has been cancelled
2025-04-28 01:01:39 -04:00
304c2f0622 Update Dockerfile 2025-04-28 00:48:05 -04:00
2d8da3e77c Update .github/workflows/testing.yml 2025-04-28 00:47:18 -04:00
3c866fd944 Update .github/workflows/testing.yml 2025-04-28 00:46:31 -04:00
f342d10b83 Update .github/workflows/deploy.yml 2025-04-28 00:14:16 -04:00
43f8018db2 Update .github/workflows/deploy.yml 2025-04-28 00:13:36 -04:00
a7fe3e5e66 Update .github/workflows/deploy.yml 2025-04-28 00:11:25 -04:00
46f3caf277 Update .github/workflows/deploy.yml 2025-04-28 00:08:56 -04:00
fe0f911ec7 Update .github/workflows/testing.yml 2025-04-27 23:59:11 -04:00
99622c5cc0 Update .github/workflows/build.yml 2025-04-27 23:56:53 -04:00
e7bcd8d016 Updated go version to 1.24 2025-04-25 17:43:32 -04:00
df78e07bd1 more changes 2025-04-25 17:42:52 -04:00
494b30b1c5 More Changes 2025-02-12 14:23:53 -05:00
27a2abc35c More changes
All checks were successful
Deploy Project / deploy (push) Successful in 4s
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 48s
Build and Push Docker Image / build-and-push (push) Successful in 10m6s
2025-02-11 18:29:19 -05:00
471fc092ce More changes
Some checks failed
Build and Push Docker Image / build-and-push (push) Successful in 10m11s
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 49s
Deploy Project / deploy (push) Has been cancelled
2025-02-11 17:49:22 -05:00
355e229212 More changes
Some checks failed
Deploy Project / deploy (push) Failing after 4s
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 51s
Build and Push Docker Image / build-and-push (push) Has been cancelled
2025-02-11 17:41:48 -05:00
78d0e72c2c More changes
Some checks are pending
Build and Push Docker Image / build-and-push (push) Blocked by required conditions
Deploy Project / deploy (push) Blocked by required conditions
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 51s
2025-02-11 17:40:16 -05:00
8039badd88 More changes
Some checks failed
Deploy Project / deploy (push) Failing after 4s
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 49s
Build and Push Docker Image / build-and-push (push) Has been cancelled
2025-02-11 17:35:50 -05:00
57aa34186b More changes
Some checks failed
Deploy Project / deploy (push) Failing after 4s
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 1m16s
Build and Push Docker Image / build-and-push (push) Successful in 10m37s
2025-02-11 17:18:40 -05:00
1aba36467a More changes
Some checks failed
Deploy Project / deploy (push) Failing after 4s
Build and Push Docker Image / build-and-push (push) Has been cancelled
Testing / test (1.23.x, ubuntu-latest) (push) Has been cancelled
2025-02-11 17:17:57 -05:00
09b11a9f80 More changes
Some checks failed
Deploy Project / deploy (push) Failing after 4s
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 55s
2025-02-11 17:14:21 -05:00
9638f3c402 More changes
Some checks failed
Deploy Project / deploy (push) Failing after 4s
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 50s
2025-02-11 17:11:49 -05:00
3d05c7de1d Testing workflows
Some checks failed
Deploy Project / deploy (push) Failing after 4s
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 48s
2025-02-11 17:09:16 -05:00
b6d88a0ae8 Some changes
Some checks failed
Deploy Project / deploy (push) Failing after 4s
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 52s
2025-02-11 17:05:21 -05:00
0e3ef7d956 More changes
All checks were successful
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 57s
Build and Push Docker Image / build-and-push (push) Successful in 10m9s
2025-02-10 23:17:16 -05:00
45689f8c0e More changes
Some checks failed
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 50s
Build and Push Docker Image / build-and-push (push) Failing after 10m2s
2025-02-10 20:11:21 -05:00
4d76b1e99f Mire changes
Some checks failed
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 58s
Build and Push Docker Image / build-and-push (push) Failing after 10m6s
2025-02-10 19:56:16 -05:00
9a7feafa51 More changes
All checks were successful
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 51s
2025-02-10 19:55:12 -05:00
39365fe0a6 More changes
Some checks failed
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 1m10s
Build and Push Docker Image / build-and-push (push) Has been cancelled
2025-02-10 19:48:29 -05:00
d2a16d5533 More changes
Some checks failed
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 50s
Build and Push Docker Image / build-and-push (push) Failing after 9m35s
2025-02-10 19:06:05 -05:00
b4c00aafaf More changes
All checks were successful
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 44s
2025-02-10 19:04:39 -05:00
a76e888c5c Fixed error
Some checks failed
Testing / test (1.23.x, ubuntu-latest) (push) Has been cancelled
2025-02-10 19:04:00 -05:00
e05d1683c6 Second stage of the docker container build
All checks were successful
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 1m6s
2025-02-10 19:00:21 -05:00
08c9147f50 Testing very first docker build
All checks were successful
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 56s
Build and Push Docker Image / build-and-push (push) Successful in 9m12s
2025-02-10 18:07:51 -05:00
e6abc692eb Removed all the *.jpg files
All checks were successful
Build and Push Docker Image / build-and-push (push) Has been skipped
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 55s
2025-02-05 14:19:41 -05:00
05aae5c7df Delete blobs/AQAD2K8xG4eUOER-.jpg
All checks were successful
Build and Push Docker Image / build-and-push (push) Has been skipped
Testing / test (1.23.x, ubuntu-latest) (push) Successful in 1m19s
2025-02-05 14:17:48 -05:00
86605f009f Delete blobs/AQAD1a4xG_axSEZ-.jpg
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been skipped
Testing / test (1.23.x, ubuntu-latest) (push) Has been cancelled
2025-02-05 14:17:42 -05:00
e326624924 Delete blobs/AQAD1a0xG45smUZ-.jpg
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been skipped
Testing / test (1.23.x, ubuntu-latest) (push) Has been cancelled
2025-02-05 14:17:36 -05:00
45d5a2348f Delete blobs/AQAD0K8xG5FI0Ud-.jpg
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been skipped
Testing / test (1.23.x, ubuntu-latest) (push) Has been cancelled
2025-02-05 14:17:31 -05:00
af723ea42e Added .gitignore
Some checks failed
Build and Push Docker Image / build-and-push (push) Has been skipped
Testing / test (1.23.x, ubuntu-latest) (push) Has been cancelled
2025-02-05 14:16:50 -05:00
125 changed files with 905 additions and 166 deletions

75
.github/workflows/CD.yml vendored Normal file
View File

@ -0,0 +1,75 @@
name: Deploy Project
on:
workflow_dispatch:
inputs:
version:
description: Application Version
type: string
required: true
env:
description: Deployment Environment
type: string
required: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# - name: Dump inputs context
# env:
# INPUTS_CONTEXT: ${{ toJson(inputs) }}
- name: Dump Inputs context
env:
INPUTS_CONTEXT: ${{ toJson(inputs) }}
run: echo "$INPUTS_CONTEXT"
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Dump job context
env:
JOB_CONTEXT: ${{ toJson(job) }}
run: echo "$JOB_CONTEXT"
- name: Dump steps context
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: echo "$STEPS_CONTEXT"
- name: Dump runner context
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}
run: echo "$RUNNER_CONTEXT"
- name: Dump strategy context
env:
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
run: echo "$STRATEGY_CONTEXT"
- name: Dump matrix context
env:
MATRIX_CONTEXT: ${{ toJson(matrix) }}
run: echo "$MATRIX_CONTEXT"
- name: Setup SSH
shell: bash
run: |
whoami
eval `ssh-agent -s`
mkdir -p ~/.ssh/
touch ~/.ssh/id_rsa
echo "${{secrets.SSH_KEY}}" | tr -d '\r' > ~/.ssh/id_rsa
chmod 700 ~/.ssh/id_rsa
ssh-keyscan -t rsa,dsa,ecdsa,ed25519 ${{secrets.SSH_HOST}} >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
- name: SSH to the Prod env
shell: bash
run: |
ssh -tt -o StrictHostKeyChecking=no gitea@${{secrets.SSH_HOST}} 'docker pull docker.savin.nyc/go-receipt-tracker:nightly'
ssh -tt -o StrictHostKeyChecking=no gitea@${{secrets.SSH_HOST}} 'cd /opt/projects/receipt-tracker && docker compose down --remove-orphans && docker compose up -d'

143
.github/workflows/CI.yml vendored Normal file
View File

@ -0,0 +1,143 @@
name: Build and Push Docker Image
on:
push:
branches:
- develop
paths-ignore:
- 'README.md'
pull_request:
branches:
- develop
paths-ignore:
- 'README.md'
workflow_dispatch:
branches:
- develop
paths-ignore:
- 'README.md'
jobs:
testing:
runs-on: ubuntu-latest
strategy:
matrix:
go-version:
- 1.24.x
os:
- ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v4
- run: |
go get -u .
go test ./.
build-and-push:
runs-on: ubuntu-latest
needs: [ testing ]
steps:
- name: Extract Version
id: version_step
run: |
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
echo REPO_VERSION=${GITHUB_REF_NAME#v} >> $GITHUB_OUTPUT
echo RELEASE_DATE=$(date --rfc-3339=date) >> ${GITHUB_ENV}
echo COMMIT_SHA_SHORT=$(echo ${{ github.sha }} | cut -c1-10) >> $GITHUB_OUTPUT
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Dump job context
env:
JOB_CONTEXT: ${{ toJson(job) }}
run: echo "$JOB_CONTEXT"
- name: Dump steps context
env:
STEPS_CONTEXT: ${{ toJson(steps) }}
run: echo "$STEPS_CONTEXT"
# echo "##[set-output name=version;]VERSION=${GITHUB_REF#$"refs/tags/v"}"
# echo "##[set-output name=version_tag;]$GITHUB_REPOSITORY:${GITHUB_REF#$"refs/tags/v"}"
# echo "##[set-output name=latest_tag;]$GITHUB_REPOSITORY:latest"
# - name: Print Version
# run: |
# echo ${{steps.version_step.outputs.version_tag}}
# echo ${{steps.version_step.outputs.latest_tag}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
with:
platforms: |
linux/amd64
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: docker.savin.nyc
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# - name: PrepareReg Names
# id: read-docker-image-identifiers
# run: |
# echo VERSION_TAG=$(echo ${{ steps.version_step.outputs.version_tag }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
# echo LASTEST_TAG=$(echo ${{ steps.version_step.outputs.latest_tag }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v6
with:
# context: .
# file: ./Dockerfile
platforms: |
linux/amd64
push: true
tags: |
docker.savin.nyc/${{ github.event.repository.name }}:nightly
docker.savin.nyc/${{ github.event.repository.name }}:${{ steps.version_step.outputs.COMMIT_SHA_SHORT }}
# ${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}
# latest
# build-args: |
# docker.savin.nyc/${{ github.event.repository.name }}:latest
# build-args: |
# ${{steps.version_step.outputs.version}}
# docker.savin.nyc/${{ github.event.repository.name }}:${{ env.RELEASE_VERSION }}
# tags: |
# ${{env.VERSION_TAG}}
# ${{env.LASTEST_TAG}}
- name: Auto Execute a Workflow
run: |
echo "URL: http://10.10.11.26:8090/api/v1/repos/${{ github.event.repository.owner.login }}/${{ github.event.repository.name }}/actions/workflows/CD.yml/dispatches"
curl -X 'POST' \
'http://10.10.11.26:8090/api/v1/repos/${{ github.event.repository.owner.login }}/${{ github.event.repository.name }}/actions/workflows/CD.yml/dispatches' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic ${{ secrets.AUTH_BASIC }}' \
-H 'Authorization: token ${{ secrets.GHA_TOKEN }}' \
-d '{"ref":"${{ github.ref }}","inputs":{"version":"${{ steps.version_step.outputs.COMMIT_SHA_SHORT }}","env":"${{ github.ref_name}}"}}'
shell: bash
with:
debug: true
# - name: Auto Deploy (Dev)
## if: ${{ contains(github.ref, 'develop') and env.AUTO_DEPLOY_DEV == 'true' }}
# id: auto-deploy-dev
# uses: https://git.savin.nyc/gh-actions/auto-exec-workflow@v1
# with:
# GITEA_TOKEN: ${{ secrets.GHA_TOKEN }}
# Version: ${{ steps.version.output.updated-version }}
- name: Output Summary
id: output-summary
shell: bash
run: |
echo "CI pipeline has been compiled for ${{ github.repository }} with a new version ${{ steps.vars.outputs.COMMIT_SHORT_SHA }}" >> $GITHUB_STEP_SUMMARY

View File

@ -1,63 +0,0 @@
name: Build and Push Docker Image
on:
push:
branches: [develop]
paths-ignore:
- 'README.md'
- '.github/**'
pull_request:
branches: [develop]
paths-ignore:
- 'README.md'
- '.github/**'
jobs:
build-and-push:
runs-on: ubuntu-latest
# needs: test
if: startsWith(github.ref, 'refs/tags')
steps:
- name: Extract Version
id: version_step
run: |
echo "##[set-output name=version;]VERSION=${GITHUB_REF#$"refs/tags/v"}"
echo "##[set-output name=version_tag;]$GITHUB_REPOSITORY:${GITHUB_REF#$"refs/tags/v"}"
echo "##[set-output name=latest_tag;]$GITHUB_REPOSITORY:latest"
- name: Print Version
run: |
echo ${{steps.version_step.outputs.version_tag}}
echo ${{steps.version_step.outputs.latest_tag}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: docker.savin.nyc
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: PrepareReg Names
id: read-docker-image-identifiers
run: |
echo VERSION_TAG=$(echo ${{ steps.version_step.outputs.version_tag }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
echo LASTEST_TAG=$(echo ${{ steps.version_step.outputs.latest_tag }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6
with:
push: true
tags: |
${{env.VERSION_TAG}}
${{env.LASTEST_TAG}}
build-args: |
${{steps.version_step.outputs.version}}
registry.akaiv.io/${{ github.event.repository.name }}:latest
registry.akaiv.io/${{ github.event.repository.name }}:${{ env.RELEASE_VERSION }}

View File

@ -1,43 +0,0 @@
name: Testing
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
go-version: [1.23.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- run: |
go get -u .
go test ./.
# test-cache:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/setup-go@v3
# with:
# go-version: 1.20.x
# - uses: actions/checkout@v3
# - uses: actions/cache@v3
# with:
# # In order:
# # * Module download cache
# # * Build cache (Linux)
# # * Build cache (Mac)
# # * Build cache (Windows)
# path: |
# ~/go/pkg/mod
# ~/.cache/go-build
# ~/Library/Caches/go-build
# ~\AppData\Local\go-build
# key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
# restore-keys: |
# ${{ runner.os }}-go-${{ matrix.go-version }}-
# - run: go test ./...

6
.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
*.jpg
*.jpeg
*.png
*.gif
go-receipt-tracker
config.*

35
Dockerfile Normal file
View File

@ -0,0 +1,35 @@
# builder
FROM golang:alpine AS builder
WORKDIR /app
ADD . /app
RUN CGO_ENABLED=0 go build -o go-receipt-tracker
# runner
FROM alpine:latest
WORKDIR /app
COPY --from=builder /app/go-receipt-tracker /app/go-receipt-tracker
# Metadata params
ARG VERSION
ARG BUILD_DATE
ARG NAME
ARG VENDOR
# Metadata
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.url="https://alex.savin.nyc" \
org.label-schema.docker.schema-version="1.0"
# org.label-schema.name=$NAME \
# org.label-schema.description="Example of multi-stage docker build" \
# org.label-schema.vcs-url=https://github.com/alex-savin/$VCS_URL \
# org.label-schema.vcs-ref=$VCS_REF \
# org.label-schema.vendor=$VENDOR \
# org.label-schema.version=$VERSION \
VOLUME /app/blobs
VOLUME /app/config
CMD ["./go-receipt-tracker"]

0
blobs/.gitkeep Normal file
View File

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 219 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 243 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 KiB

Some files were not shown because too many files have changed in this diff Show More