build #1
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 | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Step 1: Checkout the repository code | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| # Step 2: Set up Docker Buildx (for multi-platform builds if needed) | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| # Step 3: Log in to GitHub Container Registry | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| # Step 4: Build the Docker image | |
| - name: Build Docker image | |
| run: | | |
| docker build -t ghcr.io/${{ github.repository_owner }}/strfry:latest . | |
| # Step 5: Push the Docker image to GHCR | |
| - name: Push Docker image to GHCR | |
| run: | | |
| docker push ghcr.io/${{ github.repository_owner }}/strfry:latest |