This repository was archived by the owner on May 5, 2026. It is now read-only.
Add external links to base template and fix email link #34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Push Docker Production Image For Intrudex Server | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Docker image version (e.g., 1.3.2)" | |
| required: true | |
| default: "1.0.0" | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| IMAGE_NAME: armoghan/intrudex-server | |
| VERSION: 1.0.0 # <-- Just update this manually when needed | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Log in to DockerHub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build Docker Image | |
| run: | | |
| docker build -f Dockerfile.prod -t $IMAGE_NAME:${VERSION}-prod . | |
| echo "GHCR_IMAGE=ghcr.io/toolshive/intrudex" >> $GITHUB_ENV | |
| - name: Push Docker Image | |
| run: | | |
| docker push $IMAGE_NAME:${VERSION}-prod | |
| - name: Push to GitHub Container Registry | |
| run: | | |
| docker tag $IMAGE_NAME:${VERSION}-prod $GHCR_IMAGE:${VERSION}-prod | |
| docker push $GHCR_IMAGE:${VERSION}-prod |