Skip to content

Commit

Permalink
Logic to build and push docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
gregyjames committed Apr 27, 2024
1 parent 5f9c0ac commit f740b68
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/blank.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,19 @@ jobs:
convert_to_lowercase:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Convert repository name to lowercase
id: lowercase
run: echo "lowercase_repo=$(echo TESTTESTTESTTEST | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
run: echo "lowercase_repo=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Use the lowercase repository name
run: echo "The lowercase repository name is ${{ env.lowercase_repo }}"
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PAT_PACKAGE_TOKEN }}
- name: Build Image
run: docker build -t ghcr.io/${{ env.lowercase_repo }}:latest .
- name: Push Image
run: docker push ghcr.io/${{ env.lowercase_repo }}:latest

0 comments on commit f740b68

Please sign in to comment.