-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (26 loc) · 881 Bytes
/
docker.yaml
File metadata and controls
31 lines (26 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: CI/Docker
on:
push:
branches:
- main
jobs:
build:
name: Build Docker Image
runs-on: ubuntu-latest
steps:
- name: 🤓 Set image name
run: echo "IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: 🐳 Login to GitHub Container Registry
uses: docker/login-action@v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 🐳 Build and Push
uses: docker/build-push-action@v6.10.0
with:
provenance: false
platforms: linux/amd64
push: true
pull: true
tags: ghcr.io/${{ env.IMAGE_REPOSITORY }}:latest , ghcr.io/${{ env.IMAGE_REPOSITORY }}:${{ github.sha }}