43 lines
1.0 KiB
YAML
43 lines
1.0 KiB
YAML
name: Build and deploy
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Login to Gitea registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: gitea.shcizo.se
|
|
username: ${{ gitea.actor }}
|
|
password: ${{ secrets.PACKAGES_TOKEN }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: |
|
|
gitea.shcizo.se/shcizo/pdga-rating:${{ gitea.ref_name }}
|
|
gitea.shcizo.se/shcizo/pdga-rating:latest
|
|
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
needs: [build-and-push]
|
|
steps:
|
|
- uses: https://gitea.shcizo.se/shcizo/package-updater-action@v1
|
|
with:
|
|
endpoint: https://updater.shcizo.se/update
|
|
image: gitea.shcizo.se/shcizo/pdga-rating
|
|
tag: ${{ gitea.ref_name }}
|
|
token: ${{ secrets.UPDATER_API_KEY }}
|