Skip to content

Commit

Permalink
Merge pull request #1221 from AmpersandTarski/development
Browse files Browse the repository at this point in the history
  • Loading branch information
Michiel-s authored Oct 16, 2021
2 parents ce99f8e + 03d6d42 commit 7256230
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 47 deletions.
44 changes: 30 additions & 14 deletions .github/workflows/build-push-to-docker-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,42 @@ on:
push:
branches: # empty list to trigger all branches
- master
- development
release:
types:
- published
tags:
- 'v*'

jobs:
build-push:
name: Build push
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build and push Docker images
uses: docker/build-push-action@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
ampersandtarski/ampersand
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
repository: ampersandtarski/ampersand
tag_with_ref: true
cache_froms: ampersandtarski/ampersand:development
build_args: GIT_SHA=${{ github.sha }},GIT_Branch=${{ github.ref }}
add_git_labels: true

- name: Build and push to Docker Hub
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ steps.meta.outputs.tags }} # see meta step above
labels: ${{ steps.meta.outputs.labels }}
20 changes: 16 additions & 4 deletions .github/workflows/ci2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
name: Build and test 🚀

on:
pull_request:
push:
branches:
- "**" # Only trigger on branches (i.e. not tags, ..)
Expand All @@ -29,7 +28,7 @@ jobs:
run: |
chmod +x release/Linux/ampersand
echo "::set-output name=version::$(release/Linux/ampersand --numeric-version)"
echo "::set-output name=theReleaseName::$(echo "Ampersand-v$(release/Linux/ampersand --numeric-version) ($(date '+%_d %B %Y'))")"
echo "::set-output name=theReleaseName::$(echo "v$(release/Linux/ampersand --numeric-version) ($(date '+%_d %B %Y'))")"
id: get-version
-
name: zip the binaries (Linux) 🎒
Expand Down Expand Up @@ -70,7 +69,7 @@ jobs:
draft: false
prerelease: false
release_name: ${{ steps.get-version.outputs.theReleaseName }}
tag_name: Ampersand-v${{ steps.get-version.outputs.version }}
tag_name: v${{ steps.get-version.outputs.version }}
body: |
Here you find yet another release of Ampersand. Check out the [releasenotes](https://github.com/AmpersandTarski/Ampersand/blob/development/ReleaseNotes.md) to see what has changed.
env:
Expand Down Expand Up @@ -106,8 +105,22 @@ jobs:
asset_path: release/Windows-binaries-v${{ steps.get-version.outputs.version }}.zip
asset_content_type: application/zip

build-and-test-docker:
name: Build with Docker
runs-on: ubuntu-latest
env:
DOCKER_AMPERSAND_IMAGE: ampersandtarski/ampersand
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Prepare for docker
run: |
echo Running on branch ${GITHUB_REF##*/}
docker version
- name: Build final image
run: docker build . --tag ${DOCKER_AMPERSAND_IMAGE}:latest --build-arg GIT_SHA=${{ github.sha }} --build-arg GIT_Branch=${{ github.ref }}

build-and-test-ubuntu:
name: Build and test on ubuntu-latest 🏗 🧪
Expand Down Expand Up @@ -137,7 +150,6 @@ jobs:
with:
name: Linux-binaries
path: /home/runner/.local/bin/*


build-and-test-macOS:
name: Build and test on macOS 🏗 🧪
Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/continuous-integration.yml

This file was deleted.

7 changes: 7 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release notes of Ampersand

## Unreleased changes

## v4.4.2 (16 October 2021)

* Fix CI script for automatic build push to Docker Hub. Note! Release tags should now have format 'vX.Y.Z' instead of 'Ampersand-vX.Y.Z' for semver pattern to work
* Merge docker build into existing CI script. Prevent duplicate jobs, trigger on pull_request not needed.

## v4.4.1 ( 10 October 2021)

* [Issue #1212](https://github.com/AmpersandTarski/Ampersand/issues/1212) Solved issue with trailing whitespace.
Expand Down
2 changes: 1 addition & 1 deletion ampersand.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cabal-version: 2.0
-- see: https://github.com/sol/hpack

name: ampersand
version: 4.4.1
version: 4.4.2
synopsis: Toolsuite for automated design of enterprise information systems.
description: You can define your business processes by means of rules, written in Relation Algebra.
category: Database Design
Expand Down
2 changes: 1 addition & 1 deletion package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: ampersand
version: 4.4.1
version: 4.4.2
author: Stef Joosten
maintainer: [email protected]
synopsis: Toolsuite for automated design of enterprise information systems.
Expand Down

0 comments on commit 7256230

Please sign in to comment.