Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
Build continuously
Browse files Browse the repository at this point in the history
  • Loading branch information
floriandejonckheere committed Dec 4, 2023
1 parent cb75c44 commit 342d92e
Showing 1 changed file with 6 additions and 32 deletions.
38 changes: 6 additions & 32 deletions .github/workflows/ci.yml → .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- master

jobs:
app:
ci:
name: Continuous Integration
runs-on: ubuntu-22.04

Expand All @@ -35,19 +35,15 @@ jobs:
- name: Build
run: yarn build

build:
name: Build application
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
cd:
name: Continuous Deployment
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-22.04

needs:
- app
- ci

steps:
- name: Set version
run: |
echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

Expand All @@ -68,26 +64,4 @@ jobs:
with:
file: Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ env.VERSION }}

release:
name: Create release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-22.04
needs: build

steps:
- name: Set version
run: |
echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Create Github Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.event.repository.name }} ${{ env.VERSION }}
prerelease: contains(github.ref, '-')
body: |
Application ${{ github.event.repository.name }} ${{ env.VERSION }} was released
tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest

0 comments on commit 342d92e

Please sign in to comment.