Skip to content

Commit 100fe23

Browse files
authored
Merge pull request #97 from reload/oci-image-created-timestamps
Add OCI image creation timestamps
2 parents 8ce14d9 + 4b19cdd commit 100fe23

2 files changed

Lines changed: 34 additions & 16 deletions

File tree

‎.github/workflows/push.yml‎

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@ jobs:
3131
- name: Set up Docker Buildx
3232
id: buildx
3333
uses: docker/setup-buildx-action@master
34+
- name: Generate image metadata
35+
id: meta
36+
uses: docker/metadata-action@v6
37+
with:
38+
images: ghcr.io/${{ github.repository }}
39+
tags: type=raw,value=${{ matrix.derivate }}
40+
flavor: latest=false
41+
labels: |
42+
org.opencontainers.image.title=HTTPS ${{ matrix.derivate }} proxy
43+
org.opencontainers.image.description=Docker image for HTTPS ${{ matrix.derivate }} proxy
44+
org.opencontainers.image.source=https://github.com/${{ github.repository }}
45+
org.opencontainers.image.version=${{ matrix.derivate }}-${{ github.sha }}
46+
org.opencontainers.image.revision=${{ github.sha }}
3447
- name: Build HTTPS ${{ matrix.derivate }} proxy (${{ matrix.platform }})
3548
uses: docker/build-push-action@v7
3649
with:
@@ -39,14 +52,9 @@ jobs:
3952
builder: ${{ steps.buildx.outputs.name }}
4053
context: context
4154
platforms: ${{ matrix.platform }}
42-
labels: |
43-
org.opencontainers.image.title=HTTPS ${{ matrix.derivate }} proxy
44-
org.opencontainers.image.description=Docker image for HTTPS ${{ matrix.derivate }} proxy
45-
org.opencontainers.image.source=https://github.com/${{ github.repository }}
46-
org.opencontainers.image.version=${{ matrix.derivate }}-${{ github.sha }}
47-
org.opencontainers.image.revision=${{ github.sha }}
48-
tags: |
49-
ghcr.io/${{ github.repository }}:${{ matrix.derivate }}
55+
labels: ${{ steps.meta.outputs.labels }}
56+
annotations: ${{ steps.meta.outputs.annotations }}
57+
tags: ${{ steps.meta.outputs.tags }}
5058
load: ${{ (matrix.platform == 'linux/amd64') && matrix.derivate == 'base' }}
5159
- uses: e1himself/[email protected]
5260
if: ${{ (matrix.platform == 'linux/amd64') && matrix.derivate == 'base' }}

‎.github/workflows/release.yml‎

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,21 @@ jobs:
4444
registry: ghcr.io
4545
username: ${{ github.actor }}
4646
password: ${{ github.token }}
47+
- name: Generate image metadata
48+
id: meta
49+
uses: docker/metadata-action@v6
50+
env:
51+
DOCKER_METADATA_ANNOTATIONS_LEVELS: index,manifest
52+
with:
53+
images: ghcr.io/${{ github.repository }}
54+
tags: type=raw,value=${{ matrix.derivate }}
55+
flavor: latest=false
56+
labels: |
57+
org.opencontainers.image.title=HTTPS ${{ matrix.derivate }} proxy
58+
org.opencontainers.image.description=Docker image for HTTPS ${{ matrix.derivate }} proxy
59+
org.opencontainers.image.source=https://github.com/${{ github.repository }}
60+
org.opencontainers.image.version=${{ matrix.derivate }}-${{ github.sha }}
61+
org.opencontainers.image.revision=${{ github.sha }}
4762
- name: Build HTTPS ${{ matrix.derivate }} proxy
4863
uses: docker/build-push-action@v7
4964
with:
@@ -53,14 +68,9 @@ jobs:
5368
push: true
5469
context: context
5570
platforms: linux/amd64,linux/arm64
56-
labels: |
57-
org.opencontainers.image.title=HTTPS ${{ matrix.derivate }} proxy
58-
org.opencontainers.image.description=Docker image for HTTPS ${{ matrix.derivate }} proxy
59-
org.opencontainers.image.source=https://github.com/${{ github.repository }}
60-
org.opencontainers.image.version=${{ matrix.derivate }}-${{ github.sha }}
61-
org.opencontainers.image.revision=${{ github.sha }}
62-
tags: |
63-
ghcr.io/${{ github.repository }}:${{ matrix.derivate }}
71+
labels: ${{ steps.meta.outputs.labels }}
72+
annotations: ${{ steps.meta.outputs.annotations }}
73+
tags: ${{ steps.meta.outputs.tags }}
6474
cleanup:
6575
name: Cleanup
6676
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)