Skip to content

Commit

Permalink
Use environment files
Browse files Browse the repository at this point in the history
  • Loading branch information
myurasov committed Nov 29, 2023
1 parent a4a55a3 commit 092c86b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
- name: Convert repository name to lower case
id: LowCaseRepoName
run: echo "::set-output name=repo::$(echo ${{ github.repository }} | awk '{print tolower($0)}')"
run: echo "REPO=$(echo ${{ github.repository }} | awk '{print tolower($0)}')" >> $GITHUB_ENV

- name: Setup Git
run: |
Expand All @@ -32,12 +32,12 @@ jobs:
- name: Build docker image
run: |
cd ${{ github.workspace }}
docker build -t ghcr.io/"${{ steps.LowCaseRepoName.outputs.repo }}"/app-image:latest .
docker build -t ghcr.io/$REPO/app-image:latest .
- name: Login to GH registry
run: |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
- name: Push Docker image
run: |
docker push ghcr.io/"${{ steps.LowCaseRepoName.outputs.repo }}"/app-image:latest
docker push ghcr.io/$REPO/app-image:latest

0 comments on commit 092c86b

Please sign in to comment.