mirror of
https://github.com/whyvl/wireproxy.git
synced 2025-04-29 19:01:42 +02:00
Add metadata to image
This commit is contained in:
parent
d238fef2e9
commit
704fc1dbe5
2 changed files with 13 additions and 0 deletions
9
.github/workflows/container.yml
vendored
9
.github/workflows/container.yml
vendored
|
@ -20,6 +20,7 @@ jobs:
|
|||
CONTAINER_NAME: ghcr.io/${{ github.repository }}
|
||||
BUILD_PLATFORMS: linux/amd64,linux/arm,linux/arm64,linux/ppc64le,linux/s390x
|
||||
RAW_CONTAINER_TAG: ${{ github.event.inputs.container_tag || github.event.pull_request.head.ref || 'latest' }}
|
||||
RAW_REF_NAME: ${{ github.event.pull_request.head.ref || github.ref }}
|
||||
|
||||
steps:
|
||||
- name: Set up QEMU
|
||||
|
@ -49,10 +50,18 @@ jobs:
|
|||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
CONTAINER_TAG=$(echo "$RAW_CONTAINER_TAG" | sed 's/[^a-zA-Z0-9]\+/-/')
|
||||
REF_NAME=$(echo "$RAW_REF_NAME" | sed -r 's#^refs/(heads|tags)/##')
|
||||
|
||||
docker buildx build \
|
||||
--platform "$BUILD_PLATFORMS" \
|
||||
--tag "$CONTAINER_NAME:$CONTAINER_TAG" \
|
||||
--label "org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}" \
|
||||
--label "org.opencontainers.image.documentation=${{ github.server_url }}/${{ github.repository }}" \
|
||||
--label "org.opencontainers.image.url=${{ github.server_url }}/${{ github.repository }}/packages" \
|
||||
--label "org.opencontainers.image.ref.name=$REF_NAME" \
|
||||
--label "org.opencontainers.image.revision=${{ github.sha }}" \
|
||||
--label "org.opencontainers.image.vendor=${{ github.repository_owner }}" \
|
||||
--label "org.opencontainers.image.created=$(date -u --rfc-3339=seconds)" \
|
||||
--cache-from type=gha \
|
||||
--cache-to type=gha,mode=max \
|
||||
--pull --push .
|
||||
|
|
|
@ -13,3 +13,7 @@ COPY --from=build /usr/src/wireproxy/wireproxy /usr/bin/wireproxy
|
|||
VOLUME [ "/etc/wireproxy"]
|
||||
ENTRYPOINT [ "/usr/bin/wireproxy" ]
|
||||
CMD [ "--config", "/etc/wireproxy/config" ]
|
||||
|
||||
LABEL org.opencontainers.image.title wireproxy
|
||||
LABEL org.opencontainers.image.description "Wireguard client that exposes itself as a socks5 proxy"
|
||||
LABEL org.opencontainers.image.licenses ISC
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue