feat: add background to header while scrolling down #35
Workflow file for this run
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 Pull Request" | |
on: | |
pull_request: | |
types: [labeled] | |
jobs: | |
deploy_pr: | |
name: "Deploy Pull Request" | |
runs-on: ubuntu-latest | |
if: ${{ github.event.label.name == 'deploy' }} | |
permissions: | |
contents: read | |
packages: write | |
actions: write | |
pull-requests: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: set lower case owner name | |
run: | | |
echo "REPO_LC=${REPO,,}" >>${GITHUB_ENV} | |
env: | |
REPO: "${{ github.repository }}" | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./.docker/Dockerfile.dev | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ghcr.io/${{ env.REPO_LC }}-dev:pr-${{ github.event.number }} | |
- name: "Setup yq" | |
uses: dcarbone/[email protected] | |
with: | |
version: "v4.42.1" | |
force: true | |
- name: Change values in on-pr.yaml | |
run: | | |
yq -i ' | |
.ingress.hosts[0].name = "pr-${{ github.event.number }}.website.dev.green-ecolution.de" | | |
.deployment.image.tag = "pr-${{ github.event.number }}" | | |
.deployment.name = "project-website-pr-${{ github.event.number }}" | | |
.deployment.namespace = "project-website-pr-${{ github.event.number }}" | |
' ./k8s/values/develop.yaml | |
- name: Kubernetes login | |
uses: azure/k8s-set-context@v4 | |
with: | |
method: kubeconfig | |
kubeconfig: ${{ secrets.KUBE_CONFIG }} | |
- name: Install Helm Chart | |
run: | | |
helm upgrade project-website-pr-${{ github.event.number }} ./k8s \ | |
--install \ | |
--namespace project-website-pr-${{ github.event.number }} \ | |
--create-namespace \ | |
--wait \ | |
--values ./k8s/values.yaml \ | |
--values ./k8s/values/develop.yaml | |
- name: Post comment to Pull Request | |
uses: thollander/actions-comment-pull-request@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
message: | | |
Deployment of PR #${{ github.event.number }} successful :rocket: | |
You can access the deployment at [pr-${{ github.event.number }}.website.dev.green-ecolution.de](https://pr-${{ github.event.number }}.website.dev.green-ecolution.de) to review the changes :eyes: | |
:warning: **Please note that this deployment is temporary and will be deleted after the PR is closed.** |