File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : Build Docker Image
1+ name : Build and Push Docker
2+
3+ permissions :
4+ contents : read
5+ packages : write
26
37on :
48 push :
5- branches : [ master ]
6- pull_request :
7- branches : [ master ]
9+ branches : [ "main" ]
810
911jobs :
10-
1112 build :
1213 runs-on : ubuntu-latest
1314 steps :
14- - uses : actions/checkout@v3
15- - name : Build the Docker image
16- run : docker build . --file Dockerfile --tag ffmpeg:$(date +%s)
15+ - name : Checkout repository
16+ uses : actions/checkout@v4
17+
18+ - name : Log in to GitHub Container Registry
19+ uses : docker/login-action@v2
20+ with :
21+ registry : ghcr.io
22+ username : ${{ github.actor }}
23+ password : ${{ secrets.GITHUB_TOKEN }}
24+
25+ - name : Build the Docker image
26+ run : docker build . --tag ghcr.io/${{ github.repository }}/docker-ffmpeg:latest
27+
28+ - name : Push Docker image
29+ run : docker push ghcr.io/${{ github.repository }}/docker-ffmpeg:latest
You can’t perform that action at this time.
0 commit comments