notatio/.forgejo/workflows/workflow.yaml

48 lines
1.2 KiB
YAML
Raw Normal View History

on:
push:
branches:
- "main"
paths:
2024-07-02 18:49:18 +00:00
- "editor_templates/"
- "templates/"
- "static/"
- "*.go"
- "*.sh"
- "Dockerfile"
jobs:
Clone and Build:
runs-on: docker
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
ref: main
repository: Musselman/Notatio
- name: Get latest tag
run: |
tagOutput=$(git describe --abbrev=0 --tags || true)
if [ -z "$tagOutput" ] || [ "$tagOutput" == "fatal: No names found, cannot describe anything." ]; then
TAG='latest'
echo "No tags found, using default tag: $TAG"
else
TAG=$tagOutput
echo "Latest tag found: $TAG"
fi
- name: Building..
run: |
go build
- name: Testing..
run: |
echo "No Testing to do currently.."
- name: Build image
run: |
2024-07-02 18:49:18 +00:00
docker build -t notatio .
Push-Image:
runs-on: docker
steps:
- name: Push image to registry
run: |
2024-07-02 18:49:18 +00:00
docker login -u ${{ secrets.USERNAME }} -p ${{ secrets.PASSWORD }} docker.io
docker push notatio ${{ vars.registry }}
docker logout ${{ vars.registry }}