Skip to content

add build and push workflow #1

add build and push workflow

add build and push workflow #1

Workflow file for this run

name: Build and Push Docker Image
on:
push:
tags:
- 'v*'
jobs:
build-and-push:

Check failure on line 9 in .github/workflows/build-and-push.yml

View workflow run for this annotation

GitHub Actions / Build and Push Docker Image

Invalid workflow file

The workflow is not valid. .github/workflows/build-and-push.yml (Line: 9, Col: 3): The workflow must contain at least one job with no dependencies.
runs-on: ubuntu-latest
needs: [lint, test]
if: needs.lint.result == 'success' && needs.test.result == 'success'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image with tags
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:${{ github.ref_name }}
ghcr.io/${{ github.repository_owner }}/${{ github.repository }}