12345678910111213141516171819202122232425 |
- name: Push image to Docker Hub.
- on:
- push:
- tags:
- - "v*.*.*"
- env:
- DOCKER_USER: lcnetdev
- DOCKER_PASSWORD: ${{secrets.DOCKER_HUB}}
- REPO_NAME: scriptshifter
- jobs:
- push-image-to-docker-hub:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - name: Build the Docker image
- run: docker build . --tag $DOCKER_USER/$REPO_NAME:${{ github.ref_name }}
- - name: Login to Docker Hub
- uses: docker/login-action@v3
- with:
- username: lcnetdev
- password: ${{ secrets.DOCKER_HUB }}
- - name: Push to Docker Hub
- run: docker push $DOCKER_USER/$REPO_NAME:${{ github.ref_name }}
|