Skip to content

ci: adds mock deployment #13

ci: adds mock deployment

ci: adds mock deployment #13

Workflow file for this run

name: my-workflow

Check failure on line 1 in .github/workflows/my-workflow.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/my-workflow.yaml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: deploy
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
run-tests:
name: tests
runs-on: self-hosted
steps:
# ...
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
# run any `bun` or `bunx` command
- run: bun install
- run: bun test
build-and-push-image:
name: build-and-push-image
runs-on: self-hosted
needs: ['run-tests']
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
deploy:
name: deploy-to-dev
environment: Development
runs-on: self-hosted
needs: ['build-and-push-image']