mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-06-09 18:07:50 +08:00
Docker build date
This commit is contained in:
commit
6e525b3128
23
.github/workflows/build.yml
vendored
23
.github/workflows/build.yml
vendored
@ -23,7 +23,18 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
-
|
-
|
||||||
name: Build the Docker image
|
name: Build the Docker image
|
||||||
run: docker build . --file Dockerfile --build-arg "VERSION_ARG=${{ secrets.MAJOR }}.${{ secrets.MINOR }}" --build-arg "BUILD_ARG=${GITHUB_RUN_ID}" --label "id=${GITHUB_RUN_ID}" --label "version=${{ secrets.MAJOR }}.${{ secrets.MINOR }}" --tag "${{ github.repository }}:latest" --tag "${{ github.repository }}:${{ secrets.MAJOR }}.${{ secrets.MINOR }}" --tag "ghcr.io/${{ github.repository }}:latest" --tag "ghcr.io/${{ github.repository }}:${{ secrets.MAJOR }}.${{ secrets.MINOR }}"
|
run: |
|
||||||
|
docker build . \
|
||||||
|
--file Dockerfile \
|
||||||
|
--build-arg "VERSION_ARG=${{ secrets.MAJOR }}.${{ secrets.MINOR }}" \
|
||||||
|
--build-arg "BUILD_ARG=${GITHUB_RUN_ID}" \
|
||||||
|
--build-arg "DATE_ARG=${{ github.event.repository.updated_at }}" \
|
||||||
|
--label "build=${GITHUB_RUN_ID}" \
|
||||||
|
--label "version=${{ secrets.MAJOR }}.${{ secrets.MINOR }}" \
|
||||||
|
--tag "${{ github.repository }}:latest" \
|
||||||
|
--tag "${{ github.repository }}:${{ secrets.MAJOR }}.${{ secrets.MINOR }}" \
|
||||||
|
--tag "ghcr.io/${{ github.repository }}:latest" \
|
||||||
|
--tag "ghcr.io/${{ github.repository }}:${{ secrets.MAJOR }}.${{ secrets.MINOR }}"
|
||||||
-
|
-
|
||||||
name: Update Minor version
|
name: Update Minor version
|
||||||
uses: hmanzur/actions-set-secret@v2.0.0
|
uses: hmanzur/actions-set-secret@v2.0.0
|
||||||
@ -40,7 +51,9 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
-
|
-
|
||||||
name: Push to DockerHub
|
name: Push to DockerHub
|
||||||
run: docker push "${{ github.repository }}:${{ secrets.MAJOR }}.${{ secrets.MINOR }}" && docker push "${{ github.repository }}:latest"
|
run: |
|
||||||
|
docker push "${{ github.repository }}:${{ secrets.MAJOR }}.${{ secrets.MINOR }}" &&\
|
||||||
|
docker push "${{ github.repository }}:latest"
|
||||||
-
|
-
|
||||||
name: Login to GitHub Container Registry
|
name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
@ -50,7 +63,9 @@ jobs:
|
|||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
-
|
-
|
||||||
name: Push to Github Container Registry
|
name: Push to Github Container Registry
|
||||||
run: docker push "ghcr.io/${{ github.repository }}:${{ secrets.MAJOR }}.${{ secrets.MINOR }}" && docker push "ghcr.io/${{ github.repository }}:latest"
|
run: |
|
||||||
|
docker push "ghcr.io/${{ github.repository }}:${{ secrets.MAJOR }}.${{ secrets.MINOR }}" && \
|
||||||
|
docker push "ghcr.io/${{ github.repository }}:latest"
|
||||||
mirror:
|
mirror:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
@ -64,5 +79,5 @@ jobs:
|
|||||||
uses: wangchucheng/git-repo-sync@v0.1.0
|
uses: wangchucheng/git-repo-sync@v0.1.0
|
||||||
with:
|
with:
|
||||||
target-url: ${{ secrets.GITLAB_URL }}
|
target-url: ${{ secrets.GITLAB_URL }}
|
||||||
target-username: ${{ secrets.GITLAB_USERNAME }}
|
|
||||||
target-token: ${{ secrets.GITLAB_TOKEN }}
|
target-token: ${{ secrets.GITLAB_TOKEN }}
|
||||||
|
target-username: ${{ secrets.GITLAB_USERNAME }}
|
||||||
|
4
.github/workflows/check.yml
vendored
4
.github/workflows/check.yml
vendored
@ -1,10 +1,10 @@
|
|||||||
on: [workflow_call]
|
on: [workflow_call]
|
||||||
name: "Shellcheck"
|
name: "shellcheck"
|
||||||
permissions: {}
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
shellcheck:
|
shellcheck:
|
||||||
name: Shellcheck
|
name: shellcheck
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
@ -57,11 +57,17 @@ ENV RAM_SIZE "512M"
|
|||||||
ENV HOST_SERIAL ""
|
ENV HOST_SERIAL ""
|
||||||
ENV GUEST_SERIAL ""
|
ENV GUEST_SERIAL ""
|
||||||
|
|
||||||
|
ARG DATE_ARG=""
|
||||||
ARG BUILD_ARG=0
|
ARG BUILD_ARG=0
|
||||||
ARG VERSION_ARG="0.0"
|
ARG VERSION_ARG="0.0"
|
||||||
ENV BUILD=$BUILD_ARG
|
|
||||||
ENV VERSION=$VERSION_ARG
|
ENV VERSION=$VERSION_ARG
|
||||||
|
|
||||||
|
LABEL org.opencontainers.image.created=${DATE_ARG}
|
||||||
|
LABEL org.opencontainers.image.revision=${BUILD_ARG}
|
||||||
|
LABEL org.opencontainers.image.version=${VERSION_ARG}
|
||||||
|
LABEL org.opencontainers.image.url=https://hub.docker.com/r/kroese/virtual-dsm/
|
||||||
|
LABEL org.opencontainers.image.source=https://github.com/kroese/virtual-dsm/
|
||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=2s CMD curl -ILfSs http://20.20.20.21:5000/ || exit 1
|
HEALTHCHECK --interval=30s --timeout=2s CMD curl -ILfSs http://20.20.20.21:5000/ || exit 1
|
||||||
|
|
||||||
ENTRYPOINT ["/run/run.sh"]
|
ENTRYPOINT ["/run/run.sh"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user