Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 44 additions & 7 deletions .github/workflows/build_job.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Build and publish the container image
run-name: ${{ github.actor }} is creating a new release

Expand All @@ -8,6 +9,12 @@ permissions:

on:
workflow_dispatch:
inputs:
rc:
description: "Release candicated number for this release."
required: true
type: integer

push:
tags:
- 'v*.*.*'
Expand All @@ -28,11 +35,29 @@ jobs:
with:
fetch-depth: 0

- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: "3.X"

- name: Installing dependencies
run: pip install git-python packaging tomli requests

- name: Getting realease job
run: curl -Ls -o rc.py https://raw.githubusercontent.com/freva-org/freva-admin/main/release.py

- name: Get tag
id: repository
run: |
echo "tag=$(cat package.json | jq -r .version)" >> $GITHUB_OUTPUT
echo "repo=$(echo ${{ github.repository }} | tr 'A-Z' 'a-z')" >> $GITHUB_OUTPUT
RC="${{ github.event_name == 'workflow_dispatch' && inputs.rc || '' }}"
if [ "$RC" ];then
python3 rc.py rc $RC web 1> tag.txt
else
jq -r .version package.jso 1> tag.txt
fi

echo "tag=$(tail -1 tag.txt)" >> "$GITHUB_OUTPUT"
echo "repo=$(echo ${{ github.repository }} | tr 'A-Z' 'a-z')" >> "$GITHUB_OUTPUT"

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
Expand Down Expand Up @@ -104,9 +129,11 @@ jobs:
ghcr.io/${{ steps.repository.outputs.repo }}:${{ steps.repository.outputs.tag }}
ghcr.io/${{ steps.repository.outputs.repo }}:latest


bump-web-version:
runs-on: ubuntu-latest
needs: [build-and-push-image, lint]
if: github.event_name != 'workflow_dispatch'
permissions:
contents: write
packages: write
Expand All @@ -119,7 +146,7 @@ jobs:
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: "3.X"
python-version: "3.x"

- name: Install dependencies
run: python3 -m pip install git-python packaging requests tomli
Expand All @@ -130,13 +157,23 @@ jobs:
https://raw.githubusercontent.com/freva-org/freva-admin/main/release.py

- name: Get tag
id: repository
id: repo-info
run: |
echo "repo=$(echo ${{ github.repository }} | tr 'A-Z' 'a-z')" >> $GITHUB_OUTPUT
echo "tag=$(cat package.json | jq -r .version)" >> $GITHUB_OUTPUT
echo "tag=$(jq -r .version package.json)" >> $GITHUB_OUTPUT

- name: Create GitHub App token for freva-admin (freva-bot)
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ vars.FREVA_BOT_APP_ID }}
private-key: ${{ secrets.FREVA_BOT_PRIVATE_KEY }}
owner: freva-org
repositories: |
freva-admin

- name: Do the release job
run: python3 bump.py deploy web -v
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
REPO_VERSION: ${{ steps.repository.outputs.tag }}
DEPLOY_BOT_TOKEN: ${{ steps.app-token.outputs.token }}
REPO_VERSION: ${{ steps.repo-info.outputs.tag }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "evaluation_system_web",
"version": "2511.0.0",
"version": "2511.0.1",
"description": "React-bits of the freva-web interface. The react-parts of the web interface include the plugin-selection, the data-browser and the result-browser",
"main": "index.js",
"engines": {
Expand Down
Loading