keycloak-theme/.github/workflows/ci.yaml
irl 80af35807c
All checks were successful
ci / build_and_publish (push) Successful in 45s
ci: update for forgejo
2025-11-30 14:51:55 +00:00

28 lines
1.3 KiB
YAML

name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build_and_publish:
runs-on: docker
container:
image: ghcr.io/catthehacker/ubuntu:runner-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm install
- run: sudo apt update && sudo apt install -y maven
- run: npm run build-keycloak-theme
- run: mv dist_keycloak/keycloak-theme-for-kc-all-other-versions.jar sr2-theme.jar
- run: sha256sum sr2-theme.jar > sr2-theme.jar.sha256
- run: |
curl -H "Authorization: token ${{ secrets.PACKAGE_TOKEN }}" -X DELETE "https://guardianproject.dev/api/packages/sr2/generic/keycloak-theme/latest"
- run: |
curl -H "Authorization: token ${{ secrets.PACKAGE_TOKEN }}" -X PUT --upload-file sr2-theme.jar https://guardianproject.dev/api/packages/sr2/generic/keycloak-theme/latest/sr2-theme.jar
- run: |
curl -H "Authorization: token ${{ secrets.PACKAGE_TOKEN }}" -X PUT --upload-file sr2-theme.jar.sha256 https://guardianproject.dev/api/packages/sr2/generic/keycloak-theme/latest/sr2-theme.jar.sha256