انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهJNR-051-L04

المخرجات ونشر الصور (Images)

  • الدرس 4 من 7
  • Junior
في هذا الدرس 4 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

publish the JAR and a container image with version tags.

الموضوعات المخطط لها

  • Artifacts are build outputs (JAR, test reports); actions/upload-artifact keeps them with the run.
  • Images go to a registry such as GitHub Container Registry (ghcr.io).
  • Log in with the built-in GITHUB_TOKEN (set permissions: packages: write) instead of a personal password.
  • Tag images with the commit SHA and a version, not only latest.
  • Build once and promote the same image through environments.
تفاصيل المخطط المبدئي

عرض عملي

yaml
- uses: docker/login-action@v3
  with: { registry: ghcr.io, username: ${{ github.actor }}, password: ${{ secrets.GITHUB_TOKEN }} }
- uses: docker/build-push-action@v6
  with: { push: true, tags: "ghcr.io/${{ github.repository }}:${{ github.sha }}" }

اختبر فهمك

Why tag with the commit SHA?

أظهر الإجابة

You can trace and roll back to the exact build.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.