mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 21:40:01 +08:00
Update build.yml
This commit is contained in:
parent
114522fd82
commit
09e2e798a2
34
.github/workflows/build.yml
vendored
34
.github/workflows/build.yml
vendored
@ -11,18 +11,34 @@ on:
|
|||||||
- '.github/workflows/**'
|
- '.github/workflows/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
shellcheck:
|
||||||
|
name: Shellcheck
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Run ShellCheck
|
||||||
|
uses: ludeeus/action-shellcheck@master
|
||||||
|
env:
|
||||||
|
SHELLCHECK_OPTS: -e SC2001 -e SC2002 -e SC2116 -e SC2034 -e SC1091 -e SC2143 -e SC2223 -e SC2086 -e SC2145 -e SC2015 -e SC2268 -e SC2207 -e SC2064 -e SC2162 -e SC2166
|
||||||
build:
|
build:
|
||||||
|
needs: shellcheck
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
packages: write
|
packages: write
|
||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
-
|
-
|
||||||
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}" --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 }}"
|
||||||
|
-
|
||||||
|
name: Update Minor version
|
||||||
|
uses: hmanzur/actions-set-secret@v2.0.0
|
||||||
|
with:
|
||||||
|
name: 'MINOR'
|
||||||
|
value: $((${{ secrets.MINOR }}+1))
|
||||||
|
repository: ${{ github.repository }}
|
||||||
|
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
||||||
-
|
-
|
||||||
name: Login to Docker Hub
|
name: Login to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
@ -42,14 +58,14 @@ jobs:
|
|||||||
-
|
-
|
||||||
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:
|
||||||
name: Update Minor version
|
runs-on: ubuntu-latest
|
||||||
uses: hmanzur/actions-set-secret@v2.0.0
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
name: 'MINOR'
|
fetch-depth: 0
|
||||||
value: $((${{ secrets.MINOR }}+1))
|
|
||||||
repository: ${{ github.repository }}
|
|
||||||
token: ${{ secrets.REPO_ACCESS_TOKEN }}
|
|
||||||
-
|
-
|
||||||
name: Push to Gitlab mirror
|
name: Push to Gitlab mirror
|
||||||
uses: wangchucheng/git-repo-sync@v0.1.0
|
uses: wangchucheng/git-repo-sync@v0.1.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user