Advertisement
Irvannandika

Untitled

May 13th, 2025
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. name: ci
  2.  
  3. on:
  4. push:
  5. branches:
  6. - "main"
  7.  
  8. jobs:
  9. docker:
  10. runs-on: ubuntu-latest
  11. steps:
  12. - name: Checkout
  13. uses: actions/checkout@v4
  14. - name: Log in to Docker Hub
  15. uses: docker/login-action@v3
  16. with:
  17. username: ${{ vars.DOCKER_USER }}
  18. password: ${{ secrets.DOCKER_PAT }}
  19. - name: Set up Docker Buildx
  20. uses: docker/setup-buildx-action@v3
  21. with:
  22. driver: cloud
  23. endpoint: "khzmh/khzmh"
  24. install: true
  25. - name: Build and push
  26. uses: docker/build-push-action@v6
  27. with:
  28. tags: "${{ vars.DOCKER_USER }}/docker-build-cloud-demo:latest"
  29. # For pull requests, export results to the build cache.
  30. # Otherwise, push to a registry.
  31. outputs: ${{ github.event_name == 'pull_request' && 'type=cacheonly' || 'type=registry' }}
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement