Skip to content
This repository was archived by the owner on Jan 9, 2026. It is now read-only.

Commit f19a1a3

Browse files
authored
Create update_docker.yaml
1 parent c958c3b commit f19a1a3

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build and Push to GHCR
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
workflow_dispatch:
7+
8+
env:
9+
REGISTRY: ghcr.io
10+
IMAGE_NAME: kadena-io/chainweb-openapi
11+
12+
jobs:
13+
build-push:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
packages: write # Required for GHCR access
18+
id-token: write # Needed for GitHub OIDC auth
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Log in to GHCR
25+
uses: docker/login-action@v3
26+
with:
27+
registry: ${{ env.REGISTRY }}
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Build and push
32+
uses: docker/build-push-action@v5
33+
with:
34+
context: .
35+
file: ./Dockerfile
36+
push: true
37+
tags: |
38+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
39+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
40+
labels: |
41+
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}

0 commit comments

Comments
 (0)