Refactored System Message and improved clarity #56
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: Docker Image CI | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Login to Docker Hub (with secret) | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKER_ACCESS_TOKEN }} | |
- name: Build the Docker image | |
run: docker build . -t ${{ secrets.DOCKERHUB_USERNAME }}/ailama:latest -t ${{ secrets.DOCKERHUB_USERNAME }}/ailama:${{ github.sha }} | |
- name: Push the Docker image (latest and sha tags) | |
run: | | |
docker push ${{ secrets.DOCKERHUB_USERNAME }}/ailama:latest | |
docker push ${{ secrets.DOCKERHUB_USERNAME }}/ailama:${{ github.sha }} |