diff --git a/.github/workflows/build_container_image.yaml b/.github/workflows/build_container_dev.yaml similarity index 87% rename from .github/workflows/build_container_image.yaml rename to .github/workflows/build_container_dev.yaml index e454751..a9e7920 100644 --- a/.github/workflows/build_container_image.yaml +++ b/.github/workflows/build_container_dev.yaml @@ -1,9 +1,11 @@ name: Build and push Docker image on: - # release: - # types: [published, prereleased] push: - + tags: + - '*.*.*-rc*' + - '*.*.*-beta*' + - '*.*.*-alpha*' + - '*.*.*-hotfix*' jobs: build: runs-on: ubuntu-latest @@ -20,9 +22,6 @@ jobs: - name: Get the version id: get_version run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - - name: Workarount "libsqlite3-dev" installation failing - run: sudo apt-get install -y --no-install-recommends libsqlite3-dev - name: use node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 @@ -53,11 +52,10 @@ jobs: uses: docker/build-push-action@v4 with: context: './' - file: ./Dockerfile + file: ./packages/backend/Dockerfile push: true platforms: linux/amd64,linux/arm64 tags: | - ghcr.io/${{ github.repository_owner }}/backstage:latest ghcr.io/${{ github.repository_owner }}/backstage:${{ steps.get_version.outputs.VERSION }} labels: | org.opencontainers.image.description=Docker image generated from the latest Backstage release; this contains what you would get out of the box by running npx @backstage/create-app and building a Docker image from the generated source. This is meant to ease the process of evaluating Backstage for the first time, but also has the severe limitation that there is no way to install additional plugins relevant to your infrastructure. diff --git a/.github/workflows/build_container_prod.yaml b/.github/workflows/build_container_prod.yaml new file mode 100644 index 0000000..43f28a6 --- /dev/null +++ b/.github/workflows/build_container_prod.yaml @@ -0,0 +1,42 @@ +name: Build and push Docker image +on: + # release: + # types: [published, prereleased] + push: + branches: + - main + tags: + - '*.*.*' + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + + steps: + - name: checkout + uses: actions/checkout@v3 + + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: './' + file: ./Dockerfile + push: true + platforms: linux/amd64,linux/arm64 + tags: | + ghcr.io/${{ github.repository_owner }}/backstage:latest + ghcr.io/${{ github.repository_owner }}/backstage:${{ steps.get_version.outputs.VERSION }} + labels: | + org.opencontainers.image.description=Docker image generated from the latest Backstage release; this contains what you would get out of the box by running npx @backstage/create-app and building a Docker image from the generated source. This is meant to ease the process of evaluating Backstage for the first time, but also has the severe limitation that there is no way to install additional plugins relevant to your infrastructure. + org.opencontainers.image.source=https://github.com/${{ github.repository }} + org.opencontainers.image.version=${{ steps.get_version.outputs.VERSION }} \ No newline at end of file