-
Notifications
You must be signed in to change notification settings - Fork 71
73 lines (63 loc) · 2.27 KB
/
publish-devcontainer.yml
File metadata and controls
73 lines (63 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Publish Devcontainer to GHCR
on:
push:
branches:
- develop
paths:
- ".devcontainer/Dockerfile"
- ".github/workflows/publish-devcontainer.yml"
- ".python-version"
tags:
- "v*"
workflow_dispatch:
env:
IMAGE_NAME: ${{ github.repository }}/devcontainer
REGISTRY: ghcr.io
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to Container Registry
uses: docker/login-action@v4
with:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
- name: Extract Metadata
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=sha,prefix={{branch}}-
type=raw,value=latest,enable={{is_default_branch}}
labels: |
maintainer=a5chin <a5chin.origin+contact@gmail.com>
org.opencontainers.image.authors=a5chin <a5chin.origin+contact@gmail.com>
org.opencontainers.image.description=Dev Container for Python development with uv-based dependency management and environment configuration.
org.opencontainers.image.documentation=https://a5chin.github.io/python-uv/
org.opencontainers.image.licenses=MIT
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.title=python-uv
org.opencontainers.image.url=https://github.com/${{ github.repository }}
org.opencontainers.image.vendor=a5chin <a5chin.origin+contact@gmail.com>
- name: Build and Push Devcontainer Image
uses: docker/build-push-action@v7
with:
context: .
file: .devcontainer/Dockerfile
push: true
provenance: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max