name: "Bob the Builder" description: "automatic preconfigured docker image builder for gitea" inputs: registry: description: "container registry link" default: "" username: description: "username for registry authentication" required: false token: description: "token for registry authentication" required: false tag: description: "image tag to push" required: true dockerfile: description: "path to dockerfile" required: false default: "Dockerfile" build-args: description: "passed as build-args to docker build" required: false runs: using: "composite" steps: - name: "login to docker" uses: docker/login-action@v3 with: registry: ${{ inputs.registry }} username: ${{ inputs.username }} password: ${{ inputs.token }} - name: "build image" uses: docker/build-push-action@v6 with: push: true tags: ${{ inputs.tag }} file: ${{ inputs.dockerfile }} build-args: ${{ inputs.build-args }} no-cache: true - name: "cleanup image" shell: bash run: | docker rmi ${{ inputs.tag }} docker system prune