Skip to content

Commit

Permalink
use lowercase tag name
Browse files Browse the repository at this point in the history
  • Loading branch information
nanjiangshu committed Aug 2, 2023
1 parent 69c358e commit e67d068
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/tag_and_build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Build and push Docker image
on:
push:
branches:
- main
# branches:
# - main

jobs:
build-and-push:
Expand All @@ -19,15 +19,21 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get lower case repository owner
id: repo_owner
users: ASzc/change-string-case-action@v4
with:
repo_owner: ${{ github.repository_owner }}

- name: Build image
uses: docker/build-push-action@v4
with:
context:
file: ./Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/shinynbis:latest
ghcr.io/${{ github.repository_owner }}/shinynbis:${{ needs.tag.outputs.tag }}
ghcr.io/${{ steps.repo_owner.outputs.lowercase }}/shinynbis:latest
ghcr.io/${{ steps.repo_owner.outputs.lowercase }}/shinynbis:${{ needs.tag.outputs.tag }}
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
Expand Down

0 comments on commit e67d068

Please sign in to comment.