المخرجات ونشر الصور (Images)
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
publish the JAR and a container image with version tags.
الموضوعات المخطط لها
- Artifacts are build outputs (JAR, test reports);
actions/upload-artifactkeeps them with the run. - Images go to a registry such as GitHub Container Registry (
ghcr.io). - Log in with the built-in
GITHUB_TOKEN(setpermissions: 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.
تفاصيل المخطط المبدئي
عرض عملي
- 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.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.