diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml new file mode 100644 index 0000000..d6a2852 --- /dev/null +++ b/.github/workflows/docker.yaml @@ -0,0 +1,37 @@ +name: docker + +on: + push: + branches: + - "master" + +jobs: + docker: + runs-on: ubuntu-latest + permissions: + packages: write + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Test naming + run: echo "ghcr.io/${{ github.repository }}:latest" + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + platforms: linux/amd64, linux/arm64 + push: true + tags: | + ghcr.io/${{ github.repository }}:latest