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 3555dd9
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 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,20 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get lower case repository owner
id: repo_owner
uses: ASzc/change-string-case-action@v4
with:
string: ${{ 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
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 3555dd9

Please sign in to comment.