images.yml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. name: Aya test image
  2. on:
  3. schedule:
  4. - cron: "42 2 * * 0"
  5. push:
  6. branches:
  7. - 'main'
  8. paths:
  9. - 'images/**'
  10. env:
  11. REGISTRY: ghcr.io
  12. IMAGE_NAME: aya-rs/aya-test-rtf
  13. jobs:
  14. rtf:
  15. runs-on: ubuntu-latest
  16. permissions:
  17. contents: read
  18. packages: write
  19. steps:
  20. - uses: actions/checkout@v2
  21. - name: Log in to the Container registry
  22. uses: docker/login-action@v1
  23. with:
  24. registry: ${{ env.REGISTRY }}
  25. username: ${{ github.actor }}
  26. password: ${{ secrets.GITHUB_TOKEN }}
  27. - name: Extract metadata (tags, labels) for Docker
  28. id: meta
  29. uses: docker/metadata-action@v3
  30. with:
  31. images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
  32. - name: Build and push Docker image
  33. uses: docker/build-push-action@v2
  34. with:
  35. path: ./images
  36. file: Dockerfile.rtf
  37. push: true
  38. tags: ${{ steps.meta.outputs.tags }}
  39. labels: ${{ steps.meta.outputs.labels }}