Skip to content

Commit

Permalink
Closes #1672: Added release pipeline (#1673)
Browse files Browse the repository at this point in the history
  • Loading branch information
bitionaire authored May 17, 2022
1 parent 80afdaa commit 875788f
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 33 deletions.
35 changes: 2 additions & 33 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,38 +48,7 @@ jobs:
- name: Test with coverage
run: yarn test --coverage --watchAll=false --passWithNoTests

build-and-push-main:
runs-on: ubuntu-latest
package:
needs: test
if: ${{ github.event_name == 'push' }}
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Log in to Github Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build and push Frontend
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/inovex/scrumlr.io/scrumlr-frontend:latest

- name: Build and push Server
uses: docker/build-push-action@v2
with:
context: ./server/src
push: true
tags: ghcr.io/inovex/scrumlr.io/scrumlr-server:latest


uses: inovex/scrumlr.io/.github/workflows/package.yml@main
82 changes: 82 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Package

on:
workflow_call:

jobs:
package:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Log in to GitHub container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: scrumlr.io - Frontend image meta information
id: meta-frontend
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/inovex/scrumlr.io/scrumlr-frontend
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}}
type=sha,enable={{is_default_branch}},prefix=sha-,format=short
labels: |
[email protected]
org.opencontainers.image.url=https://github.com/inovex/scrumlr.io/pkgs/container/scrumlr.io%2Fscrumlr-frontend
org.opencontainers.image.source=https://github.com/inovex/scrumlr.io
org.opencontainers.image.vendor=inovex
org.opencontainers.image.licenses=MIT
org.opencontainers.image.title=scrumlr.io Frontend
org.opencontainers.image.description=The web client for scrumlr.io
- name: scrumlr.io - Server image meta information
id: meta-server
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/inovex/scrumlr.io/scrumlr-server
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=raw,value=latest,enable={{is_default_branch}}
type=sha,enable={{is_default_branch}},prefix=sha-,format=short
labels: |
[email protected]
org.opencontainers.image.url=https://github.com/inovex/scrumlr.io/pkgs/container/scrumlr.io%2Fscrumlr-server
org.opencontainers.image.source=https://github.com/inovex/scrumlr.io
org.opencontainers.image.vendor=inovex
org.opencontainers.image.licenses=MIT
org.opencontainers.image.title=scrumlr.io Server
org.opencontainers.image.description=The server for scrumlr.io
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v1

- name: Push frontend image
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ steps.meta-frontend.outputs.tags }}
labels: ${{ steps.meta-frontend.outputs.labels }}

- name: Push server image
uses: docker/build-push-action@v2
with:
context: ./server/src
push: true
tags: ${{ steps.meta-server.outputs.tags }}
labels: ${{ steps.meta-server.outputs.labels }}

11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Release

on:
release:
types: [published]

jobs:
package:
uses: inovex/scrumlr.io/.github/workflows/package.yml@main


0 comments on commit 875788f

Please sign in to comment.