name: Build and Push on: workflow_dispatch: inputs: tag: description: 'Image tag' required: true default: 'latest' push: tags: - '*' jobs: build: runs-on: ubuntu-latest permissions: contents: read packages: write steps: - uses: actions/checkout@v4 - name: Login to Gitea registry - name: Build and push run: | TAG=${{ github.ref_name }} if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then TAG=${{ inputs.tag }} fi IMAGE=gitea.home.hrajfrisbee.cz/${{ github.repository }}:$TAG docker build -t $IMAGE . docker push $IMAGE