Skip to content

Commit 8d5a688

Browse files
publish image
1 parent 26b032b commit 8d5a688

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
name: publish
15+
16+
on:
17+
push:
18+
workflow_dispatch:
19+
20+
env:
21+
REGISTRY: ghcr.io
22+
IMAGE_NAME: google/neper
23+
24+
jobs:
25+
publish:
26+
name: publish
27+
runs-on: ubuntu-latest
28+
permissions:
29+
packages: write
30+
timeout-minutes: 100
31+
32+
steps:
33+
- name: Check out code
34+
uses: actions/checkout@v4
35+
36+
- name: Set up QEMU
37+
uses: docker/setup-qemu-action@v3
38+
39+
- name: Set up Docker Buildx
40+
uses: docker/setup-buildx-action@v3
41+
42+
- name: Extract metadata (tags, labels) for Docker
43+
id: meta
44+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804
45+
with:
46+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
47+
tags: type=sha
48+
49+
- name: Log in to the Container registry
50+
uses: docker/login-action@v3
51+
with:
52+
registry: ${{ env.REGISTRY }}
53+
username: ${{ github.actor }}
54+
password: ${{ secrets.GITHUB_TOKEN }}
55+
56+
- name: Build and push Docker image
57+
uses: docker/build-push-action@v6
58+
with:
59+
context: .
60+
platforms: linux/amd64,linux/arm64
61+
push: true
62+
tags: |
63+
${{ steps.meta.outputs.tags }}
64+
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:stable
65+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)