Skip to content

Commit 4232fe4

Browse files
author
Brandon
authored
Update docker-build.yml
1 parent 3df3abc commit 4232fe4

1 file changed

Lines changed: 21 additions & 8 deletions

File tree

.github/workflows/docker-build.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,29 @@
1-
name: Build Docker Image
1+
name: Build and Push Docker
2+
3+
permissions:
4+
contents: read
5+
packages: write
26

37
on:
48
push:
5-
branches: [ master ]
6-
pull_request:
7-
branches: [ master ]
9+
branches: [ "main" ]
810

911
jobs:
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

0 commit comments

Comments
 (0)