-
Notifications
You must be signed in to change notification settings - Fork 4
35 lines (27 loc) · 853 Bytes
/
docker.yml
File metadata and controls
35 lines (27 loc) · 853 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
32
33
34
35
name: Build and Push Docker Image to GHCR
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
if: github.event_name == 'workflow_dispatch' || github.event.head_commit.message == 'build image'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
run: |
docker build -t ghcr.io/newcloudtechnologies/tsnative:latest -f Dockerfile .
- name: Push Docker image
run: |
docker push ghcr.io/newcloudtechnologies/tsnative:latest