Skip to content

Commit 2a1d86f

Browse files
committed
ci: add nginx
1 parent cd393ca commit 2a1d86f

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/nginx.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: nginx image
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "nginx/**"
9+
- ".github/workflows/nginx.yaml"
10+
workflow_dispatch:
11+
env:
12+
REGISTRY: "ghcr.io"
13+
NAMESPACE: "mskarbek/containers"
14+
IMAGE_NAME: "nginx"
15+
VERSION: "1.26.3"
16+
jobs:
17+
build-and-push-image:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
packages: write
22+
attestations: write
23+
id-token: write
24+
steps:
25+
- uses: actions/checkout@v5
26+
- uses: docker/login-action@v3
27+
with:
28+
registry: ${{ env.REGISTRY }}
29+
username: ${{ github.actor }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
- id: meta
32+
uses: docker/metadata-action@v5
33+
with:
34+
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/${{ env.IMAGE_NAME }}
35+
tags: |
36+
type=raw,value=${{ env.VERSION }}
37+
- id: push
38+
uses: docker/build-push-action@v5
39+
with:
40+
context: ./nginx/
41+
file: ./nginx/Containerfile
42+
push: true
43+
tags: ${{ steps.meta.outputs.tags }}
44+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)