Skip to content

Commit

Permalink
ci: Remove release workflows (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Cervello authored Sep 3, 2021
1 parent 51b956b commit d7dcf7f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 47 deletions.
45 changes: 0 additions & 45 deletions .github/workflows/rc-release.yml

This file was deleted.

36 changes: 35 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@master
with:
python-version: '3.x'
Expand All @@ -25,18 +26,51 @@ jobs:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/

release-gcr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@master
with:
project_id: ${{ secrets.PROJECT_ID }}
service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
export_default_credentials: true
- name: Build Docker container and publish on GCR

- name: Check release version
id: check-tag
run: |
echo ::set-output name=version::$(echo ${{ github.event.ref }} | cut -d / -f 3 | cut -c2-)
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo ::set-output name=match::true
fi
- name: Build Docker container and publish on GCR [v*.*.*]
run: make cloudbuild
env:
GCR_PROJECT_ID: ${{ secrets.GCR_PROJECT_ID }}
CLOUDBUILD_PROJECT_ID: ${{ secrets.CLOUDBUILD_PROJECT_ID }}
VERSION: ${{ steps.check-tag.outputs.version }}

- name: Build Docker container and publish on GCR [latest]
run: make cloudbuild
if: ${{ steps.check-tag.outputs.match == 'true' }}
env:
GCR_PROJECT_ID: ${{ secrets.GCR_PROJECT_ID }}
CLOUDBUILD_PROJECT_ID: ${{ secrets.CLOUDBUILD_PROJECT_ID }}
VERSION: latest

- name: Deploy Docker container to Cloud Run
run: make cloudrun
if: ${{ steps.check-tag.outputs.match == 'true' }}
env:
GCR_PROJECT_ID: ${{ secrets.GCR_PROJECT_ID }}
CLOUDBUILD_PROJECT_ID: ${{ secrets.CLOUDBUILD_PROJECT_ID }}
CLOUDRUN_PROJECT_ID: ${{ secrets.CLOUDRUN_PROJECT_ID }}
VERSION: ${{ steps.check-tag.outputs.version }}
CONFIG_URL: gs://${{ secrets.CLOUDRUN_PROJECT_ID }}/config.yaml
SIGNATURE_TYPE: http
REGION: ${{ secrets.REGION }}
SERVICE_ACCOUNT: ${{ secrets.CLOUDRUN_SERVICE_ACCOUNT }}
2 changes: 1 addition & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ steps:
id: Build SLO generator
args: ['build', '-t', 'gcr.io/$_GCR_PROJECT_ID/slo-generator:${_VERSION}', '.']

- name: gcr.io/$_GCR_PROJECT_ID/slo-generator
- name: gcr.io/$_GCR_PROJECT_ID/slo-generator:${_VERSION}
id: Run all tests
entrypoint: make
env:
Expand Down

0 comments on commit d7dcf7f

Please sign in to comment.