diff --git a/.github/workflows/controlplane-release.yaml b/.github/workflows/controlplane-release.yaml new file mode 100644 index 0000000000..9204c3c9bc --- /dev/null +++ b/.github/workflows/controlplane-release.yaml @@ -0,0 +1,57 @@ +name: Controlplane release + +on: + push: + tags: + - 'controlplane@*' + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + CONTAINER_NAME: controlplane + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Log in to Github Container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.CONTAINER_NAME }} + tags: | + type=ref,event=branch + type=sha + # set latest tag for default branch + type=raw,value=latest,enable={{is_default_branch}} + # use custom value instead of git tag + type=match,pattern=[a-zA-Z-_]+@(.*),group=1 + + - name: Install Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + push: true + file: controlplane/Dockerfile + context: . + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository }}/${{ env.container_name }}:buildcache + cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository }}/${{ env.container_name }}:buildcache,mode=max diff --git a/.github/workflows/images.yaml b/.github/workflows/images.yaml index 02a6188f5e..354058cc44 100644 --- a/.github/workflows/images.yaml +++ b/.github/workflows/images.yaml @@ -1,11 +1,11 @@ ---- name: Build and publish Docker images on: push: branches: - 'main' - pull_request: + tags-ignore: + - '**' env: REGISTRY: ghcr.io diff --git a/.github/workflows/otelcollector-release.yaml b/.github/workflows/otelcollector-release.yaml new file mode 100644 index 0000000000..a3163068e4 --- /dev/null +++ b/.github/workflows/otelcollector-release.yaml @@ -0,0 +1,57 @@ +name: Otelcollector release + +on: + push: + tags: + - 'otelcollector@*' + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + CONTAINER_NAME: otelcollector + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Log in to Github Container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.CONTAINER_NAME }} + tags: | + type=ref,event=branch + type=sha + # set latest tag for default branch + type=raw,value=latest,enable={{is_default_branch}} + # use custom value instead of git tag + type=match,pattern=[a-zA-Z-_]+@(.*),group=1 + + - name: Install Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + push: true + file: controlplane/Dockerfile + context: . + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository }}/${{ env.container_name }}:buildcache + cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository }}/${{ env.container_name }}:buildcache,mode=max diff --git a/.github/workflows/studio-release.yaml b/.github/workflows/studio-release.yaml new file mode 100644 index 0000000000..28c59ceeb2 --- /dev/null +++ b/.github/workflows/studio-release.yaml @@ -0,0 +1,57 @@ +name: Studio release + +on: + push: + tags: + - 'studio@*' + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + CONTAINER_NAME: controlplane + +jobs: + build-and-push-image: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Log in to Github Container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ${{ env.REGISTRY }}/${{ github.repository }}/${{ env.CONTAINER_NAME }} + tags: | + type=ref,event=branch + type=sha + # set latest tag for default branch + type=raw,value=latest,enable={{is_default_branch}} + # use custom value instead of git tag + type=match,pattern=[a-zA-Z-_]+@(.*),group=1 + + - name: Install Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build and push Docker image + uses: docker/build-push-action@v4 + with: + push: true + file: controlplane/Dockerfile + context: . + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository }}/${{ env.container_name }}:buildcache + cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ github.repository }}/${{ env.container_name }}:buildcache,mode=max diff --git a/connect/package.json b/connect/package.json index ef0a6ca7b0..963dc87819 100644 --- a/connect/package.json +++ b/connect/package.json @@ -1,6 +1,6 @@ { "name": "@wundergraph/cosmo-connect", - "version": "0.0.1", + "version": "0.0.0", "description": "TypeScript Connect client for WunderGraph Cosmo", "scripts": { "build": "del dist && tsc" diff --git a/otelcollector/package.json b/otelcollector/package.json new file mode 100644 index 0000000000..c81ab7723f --- /dev/null +++ b/otelcollector/package.json @@ -0,0 +1,12 @@ +{ + "name": "otelcollector", + "version": "0.0.0", + "private": true, + "description": "Placeholder package to simplify versioning and releasing with lerna.", + "keywords": ["wundergraph", "otelcollector", "cosmo"], + "author": { + "name": "WunderGraph Maintainers", + "email": "info@wundergraph.com" + }, + "license": "Apache-2.0" +} diff --git a/router/package.json b/router/package.json new file mode 100644 index 0000000000..54932fbef3 --- /dev/null +++ b/router/package.json @@ -0,0 +1,12 @@ +{ + "name": "router", + "version": "0.0.0", + "private": true, + "description": "Placeholder package to simplify versioning and releasing with lerna.", + "keywords": ["wundergraph", "router", "cosmo"], + "author": { + "name": "WunderGraph Maintainers", + "email": "info@wundergraph.com" + }, + "license": "Apache-2.0" +} diff --git a/shared/package.json b/shared/package.json index e76508da48..b08e3df491 100644 --- a/shared/package.json +++ b/shared/package.json @@ -1,6 +1,6 @@ { "name": "@wundergraph/cosmo-shared", - "version": "0.1.0", + "version": "0.0.0", "description": "Shared code between WunderGraph Cosmo packages", "main": "./dist/index.js", "type": "module",