Update npm #2470
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: PullRequest | |
on: | |
pull_request: {} | |
env: | |
REGISTRY: registry.cloudscale-lpg-2.appuio.cloud | |
NAMESPACE: appuio-control-api-preview | |
IMAGE_NAME: cloud-portal | |
jobs: | |
build: | |
uses: ./.github/workflows/template-build.yaml | |
docker: | |
runs-on: ubuntu-latest | |
environment: preview | |
needs: | |
- build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: dist | |
- name: Extract metadata for Docker | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
# by default, it creates the `:pr-#` tag in pull requests and branch name on `master` | |
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }} | |
- name: Docker login | |
if: ${{ !startsWith(github.head_ref, 'renovate/') }} | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.OPENSHIFT_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: ${{ !startsWith(github.head_ref, 'renovate/') }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
deploy: | |
# Don't deploy with Renovate PRs | |
if: ${{ !startsWith(github.head_ref, 'renovate/') }} | |
uses: ./.github/workflows/template-deploy.yaml | |
with: | |
namespace: appuio-control-api-preview | |
helm_release_name: portal-pr-${{ github.event.number }} | |
image_tag: pr-${{ github.event.number }} | |
revision: ${{ github.event.pull_request.head.sha }} | |
secrets: | |
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }} | |
keycloak_password: ${{ secrets.KEYCLOAK_PASSWORD }} | |
keycloak_user: ${{ secrets.KEYCLOAK_USER }} | |
glitch_tip_dsn: ${{ secrets.GLITCH_TIP_DSN }} | |
needs: | |
- build | |
- docker |