-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: replace circleci with GH actions
Signed-off-by: Rael Garcia <rael@redhat.com>
- Loading branch information
Showing
4 changed files
with
55 additions
and
48 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Export release name | ||
run: | | ||
echo "NEW_RELEASE=$(make get-new-release)" >> $GITHUB_ENV | ||
- name: Build images | ||
run: TAG=${NEW_RELEASE:-latest} make build-all-release | ||
|
||
- name: Login to quay.io/3scale | ||
if: ${{ env.NEW_RELEASE != '' }} | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.REGISTRY_USER }} | ||
password: ${{ secrets.REGISTRY_PASSWORD }} | ||
|
||
- name: Push new images | ||
if: ${{ env.NEW_RELEASE != '' }} | ||
run: TAG=${NEW_RELEASE:-latest} make push-all-release | ||
|
||
- name: Create a new draft-release in github | ||
if: ${{ env.NEW_RELEASE != '' }} | ||
uses: "marvinpinto/action-automatic-releases@latest" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "${{ env.NEW_RELEASE }}" | ||
title: "${{ env.NEW_RELEASE }}" | ||
draft: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
REPO="3scale-ops/soyuz" | ||
|
||
# Skip if alpha release | ||
[[ ${1} == *"-alpha"* ]] && echo "" && exit 0 | ||
|
||
# Skip if release already exists | ||
curl -o /dev/null --fail --silent "https://api.github.com/repos/${REPO}/releases/tags/${1}" && echo "" && exit 0 | ||
|
||
echo ${1} |