Update workflow #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Dokerfile | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
registry: ghrc.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set Owner name to LowerCase | |
id: lower_case | |
run: | | |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV} | |
echo "REPOSITORY_LC=${REPOSITORY,,}" >>${GITHUB_ENV} | |
echo "::set-output name=ownerlc::$OWNER_LC" | |
echo "::set-output name=repositorylc::$REPOSITORY_LC" | |
env: | |
OWNER: "${{ github.repository_owner }}" | |
REPOSITORY: "${{ github.repository }}" | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: ghcr.io/${{ steps.lower_case.outputs.ownerlc }}/${{ steps.lower_case.outputs.repositorylc }}:latest |