Skip to content

Commit 091b16e

Browse files
committed
Use seperate workflows for dev and prod images
1 parent 7a8c6d3 commit 091b16e

File tree

2 files changed

+48
-8
lines changed

2 files changed

+48
-8
lines changed

.github/workflows/build_container_image.yaml renamed to .github/workflows/build_container_dev.yaml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
name: Build and push Docker image
22
on:
3-
# release:
4-
# types: [published, prereleased]
53
push:
6-
4+
tags:
5+
- '*.*.*-rc*'
6+
- '*.*.*-beta*'
7+
- '*.*.*-alpha*'
8+
- '*.*.*-hotfix*'
79
jobs:
810
build:
911
runs-on: ubuntu-latest
@@ -20,9 +22,6 @@ jobs:
2022
- name: Get the version
2123
id: get_version
2224
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
23-
24-
- name: Workarount "libsqlite3-dev" installation failing
25-
run: sudo apt-get install -y --no-install-recommends libsqlite3-dev
2625

2726
- name: use node.js ${{ matrix.node-version }}
2827
uses: actions/setup-node@v3
@@ -53,11 +52,10 @@ jobs:
5352
uses: docker/build-push-action@v4
5453
with:
5554
context: './'
56-
file: ./Dockerfile
55+
file: ./packages/backend/Dockerfile
5756
push: true
5857
platforms: linux/amd64,linux/arm64
5958
tags: |
60-
ghcr.io/${{ github.repository_owner }}/backstage:latest
6159
ghcr.io/${{ github.repository_owner }}/backstage:${{ steps.get_version.outputs.VERSION }}
6260
labels: |
6361
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.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build and push Docker image
2+
on:
3+
# release:
4+
# types: [published, prereleased]
5+
push:
6+
branches:
7+
- main
8+
tags:
9+
- '*.*.*'
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
fail-fast: false
17+
18+
steps:
19+
- name: checkout
20+
uses: actions/checkout@v3
21+
22+
- name: Get the version
23+
id: get_version
24+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
25+
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v2
28+
29+
- name: Build and push
30+
uses: docker/build-push-action@v4
31+
with:
32+
context: './'
33+
file: ./Dockerfile
34+
push: true
35+
platforms: linux/amd64,linux/arm64
36+
tags: |
37+
ghcr.io/${{ github.repository_owner }}/backstage:latest
38+
ghcr.io/${{ github.repository_owner }}/backstage:${{ steps.get_version.outputs.VERSION }}
39+
labels: |
40+
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.
41+
org.opencontainers.image.source=https://github.com/${{ github.repository }}
42+
org.opencontainers.image.version=${{ steps.get_version.outputs.VERSION }}

0 commit comments

Comments
 (0)