31 lines
712 B
YAML
31 lines
712 B
YAML
name: Build Container Image
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build image for amd64
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./server/Dockerfile
|
|
platforms: linux/amd64
|
|
push: false
|
|
tags: vultr-api-server:${{ github.sha }}
|
|
load: true
|
|
|
|
- name: Test image
|
|
run: |
|
|
docker run --rm vultr-api-server:${{ github.sha }} python -c "from vultr_api import VultrClient; print('OK')"
|