Skip to content

Commit e9bc3de

Browse files
authored
Create release.yml
addded specific tagging to release docker
1 parent 7ef4bd8 commit e9bc3de

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Docker Build and Push on Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-and-push:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout Repository
12+
uses: actions/checkout@v3
13+
14+
- name: Log in to Docker Registry
15+
uses: docker/login-action@v1
16+
with:
17+
registry: ghcr.io # replace with your registry if different
18+
username: ${{ github.actor }}
19+
password: ${{ secrets.GITHUB_TOKEN }}
20+
21+
- name: Build and Push Docker image
22+
uses: docker/build-push-action@v2
23+
with:
24+
context: .
25+
file: ./Dockerfile
26+
push: true
27+
tags: ghcr.io/${{ github.repository }}/httpd-proxy:${{ github.event.release.name }} # replace with your image name and tag

0 commit comments

Comments
 (0)