Update README.md #160
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: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: List files in the repository root | |
run: ls -alh | |
- name: Build and push Docker image | |
run: | | |
docker buildx build --file ./Dockerfile --tag ${{ secrets.DOCKER_USERNAME }}/picpilot:$(date +%s) --push --cache-to=type=local,dest=/tmp/.buildx-cache,new=true --cache-from=type=local,src=/tmp/.buildx-cache . | |
working-directory: ${{ github.workspace }} |