Pinsave/counterstrike
1
1# GitHub Actions workflow to build and push Docker image to GitHub Container Registry2name: Build and Push Docker Image3 4on:5 workflow_dispatch:6 7env:8 IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/cs16-web-server9 10jobs:11 build-and-push:12 name: Build and Push13 runs-on: ubuntu-latest14 permissions:15 contents: read16 packages: write17 18 steps:19 - name: Checkout repository20 uses: actions/checkout@v421 22 - name: Log in to GitHub Container Registry23 uses: docker/login-action@v324 with:25 registry: ghcr.io26 username: ${{ github.repository_owner }}27 password: ${{ secrets.GITHUB_TOKEN }}28 29 - name: Set up Docker Buildx30 uses: docker/setup-buildx-action@v331 32 - name: Build and push33 uses: docker/build-push-action@v634 with:35 context: .36 push: true37 platforms: linux/38638 tags: |39 ${{ env.IMAGE_NAME }}:latest40 ${{ env.IMAGE_NAME }}:${{ github.sha }}41 