merith-tk
1b7b89ccc6
All checks were successful
Build Docker Image on Commit / build-and-publish (push) Successful in 5s
26 lines
543 B
YAML
26 lines
543 B
YAML
name: Build Docker Image on Commit
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- '!' # Exclude tags
|
|
|
|
jobs:
|
|
build-and-publish:
|
|
runs-on: docker-builder
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build and push Docker image
|
|
run: |
|
|
REPO=git.merith.xyz/${{ github.repository }}
|
|
|
|
# Build Docker image
|
|
docker build -t $REPO:${{ github.sha }} .
|
|
|
|
# Remove the local image to save storage
|
|
docker rmi $REPO:${{ github.sha }}
|