Skip to content

Commit

Permalink
Lowercase repostory name
Browse files Browse the repository at this point in the history
  • Loading branch information
andychase committed Sep 26, 2024
1 parent f941e08 commit a75cf60
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
#
##
name: Create and publish a Docker image

# Configures this workflow to run every time a change is pushed to the branch called `release`.
# Configures this workflow to run every time a change is pushed to the branch 'main' or a tag is pushed.
on:
push:
branches: ['main']
branches:
- main
tags:
- '*'

# Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds.
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME: ${{ github.repository | toLowerCase }}

# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
jobs:
build-and-push-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
#

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Capture the git description to tag the Docker image.
- name: Get git tag
# Capture the git description to tag the Docker image. If a tag is pushed, it will use the tag, otherwise, it will use the commit SHA.
- name: Determine the Git Tag or Commit SHA
id: git_tag
run: echo "GIT_TAG=$(git describe --always)" >> $GITHUB_ENV

Expand Down Expand Up @@ -56,3 +58,4 @@ jobs:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.GIT_TAG }}
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit a75cf60

Please sign in to comment.