images.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. - '.github/workflows/images.yml'
  11. pull_request:
  12. branches:
  13. - 'main'
  14. paths:
  15. - 'images/**'
  16. - '.github/workflows/images.yml'
  17. env:
  18. REGISTRY: ghcr.io
  19. IMAGE_NAME: aya-rs/aya-test-rtf
  20. jobs:
  21. rtf:
  22. runs-on: ubuntu-latest
  23. permissions:
  24. contents: read
  25. packages: write
  26. steps:
  27. - uses: actions/checkout@v2
  28. - name: Log in to the Container registry
  29. uses: docker/login-action@v1
  30. with:
  31. registry: ${{ env.REGISTRY }}
  32. username: ${{ github.actor }}
  33. password: ${{ secrets.GITHUB_TOKEN }}
  34. - name: Extract metadata (tags, labels) for Docker
  35. id: meta
  36. uses: docker/metadata-action@v3
  37. with:
  38. images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
  39. - name: Build and push Docker image
  40. uses: docker/build-push-action@v2
  41. with:
  42. context: images
  43. file: images/Dockerfile.rtf
  44. push: true
  45. tags: ${{ steps.meta.outputs.tags }}
  46. labels: ${{ steps.meta.outputs.labels }}