name: Release # A tag v* publishes the agent's image to Gitea's registry (Development Plan # M1.5, X4): gitea.dongar.net/dongar/nisse-dev: and :latest. The token # is a secret (REGISTRY_TOKEN: write:package for REGISTRY_USER); the # account is a setting, so it's here. on: push: tags: ["v*"] env: REGISTRY: gitea.dongar.net REGISTRY_USER: dongar IMAGE: gitea.dongar.net/dongar/nisse-dev jobs: image: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Build run: | docker build --target agent \ --label org.opencontainers.image.revision="${{ github.sha }}" \ --label org.opencontainers.image.version="${{ github.ref_name }}" \ -t "$IMAGE:${{ github.ref_name }}" -t "$IMAGE:latest" . - name: Push env: REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }} run: | printf '%s' "$REGISTRY_TOKEN" | docker login "$REGISTRY" -u "$REGISTRY_USER" --password-stdin docker push "$IMAGE:${{ github.ref_name }}" docker push "$IMAGE:latest" docker logout "$REGISTRY"