Skip to content

make repo lowwer case #4

make repo lowwer case

make repo lowwer case #4

Workflow file for this run

name: Deploy to GitHub Container Registry
on:
push:
branches:
- "new-version"
env:
REGISTRY: ghcr.io
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get repository name in lowercase
id: repo_name
run: echo "REPO_NAME=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Get short SHA
id: sha
run: echo "sha=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
${{ env.REGISTRY }}/${{ env.REPO_NAME }}:latest
${{ env.REGISTRY }}/${{ env.REPO_NAME }}:${{ env.sha }}