Skip to content

Commit a4ad5d8

Browse files
committed
feat: update release workflow to build and push docker image
- Update the release workflow to use docker/build-push-action@v6. - This allows for building and pushing the docker image to dockerhub. - The image is tagged with the github sha. - Added permissions for writing packages and reading contents.
1 parent 8d99f62 commit a4ad5d8

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,20 @@ name: Release
22

33
on:
44
push:
5-
branches: [ "v2" ]
5+
branches: ["v2"]
66
pull_request:
7-
branches: [ "v2" ]
7+
branches: ["v2"]
8+
9+
permissions:
10+
packages: write
11+
contents: read
812

913
jobs:
1014
build:
1115
runs-on: ubuntu-latest
1216
steps:
13-
- uses: actions/checkout@v4
14-
- name: Build the Docker image
15-
run: docker build . --file Dockerfile --tag website:$(date +%s)
17+
- name: Build and Push
18+
uses: docker/build-push-action@v6
19+
with:
20+
push: true
21+
tags: ethn1ee/website:${{ github.sha }}

0 commit comments

Comments
 (0)