Skip to content

Update Index.cshtml #59

Update Index.cshtml

Update Index.cshtml #59

name: Docker
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
push:
branches: ["main"]
paths-ignore: [ "helm/**" ]
env:
# Use docker.io for Docker Hub if empty
REGISTRY: registry.hub.docker.com
# github.repository as <account>/<repo>
IMAGE_NAME: bhdryrdm/asgard
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file ./AsgardProject/Dockerfile --tag bhdryrdm/asgard:${GITHUB_RUN_NUMBER} --tag bhdryrdm/asgard:latest
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
run: docker login -u ${{ github.actor }} -p ${{ secrets.PASSWORD }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Push the Docker image
run: |
docker push bhdryrdm/asgard:${GITHUB_RUN_NUMBER}
docker push bhdryrdm/asgard:latest
- uses: actions/checkout@v3
name: changing the deployment of git repo
with:
repository: 'bhdryrdm/asgard'
token: ${{ secrets.TOKEN }}
- name: Update values.yaml
run: |
cd helm/asgard
sed -i 's|tag:.*|tag: '${GITHUB_RUN_NUMBER}'|' values.yaml
git config --global user.name 'GitHub Actions'
git config --global user.email 'bhdryrdm@gmail.com'
git add values.yaml
git commit -m "Update values.yaml"
git push