29 lines
641 B
YAML
29 lines
641 B
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'Dockerfile'
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Login to Docker Registry
|
|
run: |
|
|
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ms -u --password-stdin
|
|
|
|
- name: Build and push Docker image
|
|
run: |
|
|
IMAGE_NAME=registry.msws.xyz/steamcmd:lastest
|
|
docker build -t $IMAGE_NAME .
|
|
docker push $IMAGE_NAME
|
|
env:
|
|
DOCKER_BUILDKIT: 1 # Enable buildkit for faster builds
|