budget/.gitea/workflows/deploy.yaml

31 lines
803 B
YAML
Raw Normal View History

name: Deploy
on:
push:
tags:
- "**"
jobs:
deploy:
runs-on: cth-ubuntu-latest
steps:
2024-11-26 23:27:30 -05:00
- uses: actions/checkout@v4
2024-11-26 23:24:18 -05:00
- name: Read .ruby-version file
id: ruby
run: echo "version=$(cat .ruby-version)" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Push image
uses: docker/build-push-action@v6
with:
push: true
2024-11-26 23:30:11 -05:00
build-args: |
RUBY_VERSION=${{ steps.ruby.outputs.version }}
tags: |
docker.atomaka.com/budget:latest
docker.atomaka.com/budget:${{gitea.sha}}
2024-11-26 23:33:26 -05:00
- name: Deploy to server
run: |
curl --oauth2-bearer ${{ secrets.WATCHTOWER_TOKEN }} \
${{ secrets.WATCHTOWER_HOST }}/v1/update?images=docker.atomaka.com/budget