diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f4ee260..64098d2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,15 +12,6 @@ on: - patch - minor - major - edition: - description: 'Edition to build' - required: true - default: 'oss' - type: choice - options: - - oss - - enterprise - - both permissions: contents: write @@ -115,48 +106,7 @@ jobs: git tag -a ${{ steps.version.outputs.new_version }} -m "Release ${{ steps.version.outputs.new_version }}" git push origin ${{ steps.version.outputs.new_version }} - build-docker-oss: - if: ${{ inputs.edition == 'oss' || inputs.edition == 'both' }} - needs: release - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: ghcr.io/${{ github.repository }} - tags: | - type=raw,value=${{ needs.release.outputs.version }}-oss - type=raw,value=latest-oss - - - name: Build and push Docker image (OSS) - uses: docker/build-push-action@v5 - with: - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - platforms: linux/amd64,linux/arm64 - cache-from: type=gha - cache-to: type=gha,mode=max - build-args: | - NEXT_PUBLIC_OPSORCH_EDITION=oss - - build-docker-enterprise: - if: ${{ inputs.edition == 'enterprise' || inputs.edition == 'both' }} + build-docker: needs: release runs-on: ubuntu-latest steps: @@ -179,10 +129,10 @@ jobs: with: images: ghcr.io/${{ github.repository }} tags: | - type=raw,value=${{ needs.release.outputs.version }}-enterprise - type=raw,value=latest-enterprise + type=raw,value=${{ needs.release.outputs.version }} + type=raw,value=latest - - name: Build and push Docker image (Enterprise) + - name: Build and push Docker image uses: docker/build-push-action@v5 with: context: . @@ -192,11 +142,9 @@ jobs: platforms: linux/amd64,linux/arm64 cache-from: type=gha cache-to: type=gha,mode=max - build-args: | - NEXT_PUBLIC_OPSORCH_EDITION=enterprise github-release: - needs: release + needs: [release, build-docker] if: always() && needs.release.result == 'success' runs-on: ubuntu-latest steps: @@ -223,17 +171,8 @@ jobs: echo "## Docker Images" >> changelog.md echo "" >> changelog.md echo "Docker images are available at:" >> changelog.md - - if [[ "${{ inputs.edition }}" == "oss" || "${{ inputs.edition }}" == "both" ]]; then - echo "- **OSS Edition**: \`ghcr.io/${{ github.repository }}:${{ needs.release.outputs.version }}-oss\`" >> changelog.md - echo "- **OSS Latest**: \`ghcr.io/${{ github.repository }}:latest-oss\`" >> changelog.md - fi - - if [[ "${{ inputs.edition }}" == "enterprise" || "${{ inputs.edition }}" == "both" ]]; then - echo "- **Enterprise Edition**: \`ghcr.io/${{ github.repository }}:${{ needs.release.outputs.version }}-enterprise\`" >> changelog.md - echo "- **Enterprise Latest**: \`ghcr.io/${{ github.repository }}:latest-enterprise\`" >> changelog.md - fi - + echo "- \`ghcr.io/${{ github.repository }}:${{ needs.release.outputs.version }}\`" >> changelog.md + echo "- \`ghcr.io/${{ github.repository }}:latest\`" >> changelog.md echo "" >> changelog.md echo "Pull with: \`docker pull ghcr.io/${{ github.repository }}:\`" >> changelog.md @@ -247,4 +186,4 @@ jobs: prerelease: false env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}