Merge pull request #131 from UniversityOfHelsinkiCS/renovate/all-mino… #454
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
name: Deploy to staging | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build image | |
id: build-image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: ipsutin | |
tags: staging ${{ github.sha }} | |
containerfiles: | | |
./Dockerfile | |
build-args: | | |
BASE_PATH= | |
GIT_SHA=${{ github.sha }} | |
STAGING=true | |
- name: Push to quay.io | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ${{ steps.build-image.outputs.image }} | |
tags: ${{ steps.build-image.outputs.tags }} | |
registry: quay.io/toska | |
username: toska+github | |
password: ${{ secrets.QUAY_IO_TOKEN }} | |
sentry-release: | |
runs-on: ubuntu-latest | |
needs: build-and-push | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Pull image and create a container | |
run: docker create --name ipsutin quay.io/toska/ipsutin:staging | |
- name: Copy assets from the container | |
run: docker cp ipsutin:/opt/app-root/src ./app | |
- name: Create Sentry release | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_URL: ${{ secrets.SENTRY_URL }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} | |
with: | |
environment: production | |
set_commits: 'skip' | |
sourcemaps: ./app | |
url_prefix: '~/app' |