Skip to content

test build and push

test build and push #2

name: Build and Push Docker Image to GHCR
on:
push:
branches:
- main # Change this to the appropriate branch if needed
- gh-action
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v2

Check failure on line 21 in .github/workflows/build-push-ghcr.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-push-ghcr.yml

Invalid workflow file

You have an error in your yaml syntax on line 21
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker image
run: |
docker buildx create --use
docker buildx build --push -t ghcr.io/${{ github.repository }}:latest -f Dockerfile.base .