36 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
	
		
			1.1 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: Release into production
 | |
| 
 | |
| on:
 | |
|   release:
 | |
|     types: [published]
 | |
|   workflow_dispatch:
 | |
|     inputs:
 | |
|       version:
 | |
|         description: 'Version to release'
 | |
|         required: true
 | |
|         default: 'latest'
 | |
|         type: string
 | |
| 
 | |
| jobs:
 | |
|   build:
 | |
|     runs-on: [dev, amd64]
 | |
|     steps:
 | |
|       - uses: actions/checkout@v4
 | |
|       - uses: actions/setup-python@v5
 | |
|         with:
 | |
|           python-version: '3.13' 
 | |
|       - name: Get git tag
 | |
|         id: get_tag
 | |
|         if: github.event_name == 'release'
 | |
|         run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
 | |
|       - name: Set version from input
 | |
|         if: github.event_name == 'workflow_dispatch'
 | |
|         run: echo "TAG_NAME=${{ github.event.inputs.version }}" >> $GITHUB_ENV
 | |
|       - name: Registry login
 | |
|         run: docker login gitea.ceperka.net -u "${{ secrets.HARBOR_REPO_USERNAME }}" -p "${{ secrets.HARBOR_REPO_PASSWORD }}"
 | |
|       - name: Final build
 | |
|         run: task squashed REPO=harbor.rosti.cz/rosti/runtime VERSION=${{ env.TAG_NAME }}
 | |
|       - name: Push
 | |
|         run: task push REPO=harbor.rosti.cz/rosti/runtime VERSION=${{ env.TAG_NAME }}
 | |
| 
 | |
| 
 |