Skip to content
This repository was archived by the owner on Oct 25, 2023. It is now read-only.

Commit 4442e64

Browse files
committed
update
1 parent c808d08 commit 4442e64

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/v1.0.2.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Container Image CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
release:
9+
types: [published]
10+
11+
env:
12+
REGISTRY: ghcr.io
13+
IMAGE_NAME: ${{ github.repository }}
14+
15+
jobs:
16+
build-and-push-image:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
packages: write
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v3
25+
with:
26+
ref: c808d08f7da71fe33b0bf3efcd0cd40ae9d75109
27+
28+
- name: Login to Github Container Registory
29+
uses: docker/login-action@v2
30+
with:
31+
registry: ${{ env.REGISTRY }}
32+
username: ${{ github.actor }}
33+
password: ${{ secrets.GITHUB_TOKEN }}
34+
35+
- name: Extract metadata (tags, labels) for Container
36+
id: meta
37+
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
38+
with:
39+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
40+
41+
- name: Build and Push Container Images
42+
uses: docker/build-push-action@v4
43+
with:
44+
context: .
45+
file: ./Dockerfile
46+
push: true
47+
tags: ghcr.io/docheio/container-api:1.0.2
48+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)