aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/release-build.yaml36
1 files changed, 18 insertions, 18 deletions
diff --git a/.github/workflows/release-build.yaml b/.github/workflows/release-build.yaml
index c33280f..a6873f6 100644
--- a/.github/workflows/release-build.yaml
+++ b/.github/workflows/release-build.yaml
@@ -28,9 +28,9 @@ jobs:
id: version
run: |-
if [[ ${{ inputs.version }} == "master" ]]; then
- echo "VERSION=$(date +'%Y%m%d%H')" >> $GITHUB_ENV
+ echo "BUILD_VERSION=$(date +'%Y%m%d%H')" >> $GITHUB_ENV
else
- echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV
+ echo "BUILD_VERSION=${{ inputs.version }}" >> $GITHUB_ENV
fi
- name: "Install dependencies"
@@ -46,7 +46,7 @@ jobs:
- name: "Run builder for ${{ matrix.version }} ${{ matrix.arch }}"
run: |-
- sudo ./build.py ${VERSION} debian ${{ matrix.arch }} ${{ matrix.release }}
+ sudo ./build.py ${BUILD_VERSION} debian ${{ matrix.arch }} ${{ matrix.release }}
- name: "Upload artifacts to repository server"
uses: appleboy/scp-action@v0.1.7
@@ -56,7 +56,7 @@ jobs:
key: "${{ secrets.REPO_KEY }}"
source: "out/debian/*"
strip_components: 2
- target: "/srv/incoming/${VERSION}/debian/${{ matrix.arch }}/${{ matrix.release }}"
+ target: "/srv/incoming/${BUILD_VERSION}/debian/${{ matrix.arch }}/${{ matrix.release }}"
- name: "Import artifacts into reprepro"
uses: appleboy/ssh-action@v1.0.3
@@ -71,8 +71,8 @@ jobs:
else
COMPONENT="unstable"
fi
- sudo reprepro --basedir /srv/debian --component ${COMPONENT} includedeb ${{ matrix.release }} /srv/incoming/${VERSION}/debian/${{ matrix.arch }}/${{ matrix.release }}/*.deb
- sudo reprepro --basedir /srv/debian --component ${COMPONENT} includedsc ${{ matrix.release }} /srv/incoming/${VERSION}/debian/${{ matrix.arch }}/${{ matrix.release }}/*.dsc
+ flock /run/lock/github-reprepro-debian.lock sudo reprepro --basedir /srv/debian --component ${COMPONENT} includedeb ${{ matrix.release }} /srv/incoming/${BUILD_VERSION}/debian/${{ matrix.arch }}/${{ matrix.release }}/*.deb
+ flock /run/lock/github-reprepro-debian.lock sudo reprepro --basedir /srv/debian --component ${COMPONENT} includedsc ${{ matrix.release }} /srv/incoming/${BUILD_VERSION}/debian/${{ matrix.arch }}/${{ matrix.release }}/*.dsc
- name: "Move artifacts into repository"
uses: appleboy/ssh-action@v1.0.3
@@ -81,10 +81,10 @@ jobs:
username: "${{ secrets.REPO_USER }}"
key: "${{ secrets.REPO_KEY }}"
script: |
- sudo mkdir -p /srv/repository/mirror/releases/server/debian/versions/${VERSION}/${{ matrix.arch }}
- sudo mv -t /srv/repository/mirror/releases/server/debian/versions/${VERSION}/${{ matrix.arch }}/ /srv/incoming/${VERSION}/debian/${{ matrix.arch }}/${{ matrix.release }}/*
+ sudo mkdir -p /srv/repository/mirror/releases/server/debian/versions/${BUILD_VERSION}/${{ matrix.arch }}
+ sudo mv -t /srv/repository/mirror/releases/server/debian/versions/${BUILD_VERSION}/${{ matrix.arch }}/ /srv/incoming/${BUILD_VERSION}/debian/${{ matrix.arch }}/${{ matrix.release }}/*
if [[ ${{ inputs.version }} != "master" ]]; then
- sudo ln -s /srv/repository/mirror/releases/server/debian/versions/${VERSION}/${{ matrix.arch }} /srv/repository/mirror/releases/server/debian/latest-server
+ sudo ln -s /srv/repository/mirror/releases/server/debian/versions/${BUILD_VERSION}/${{ matrix.arch }} /srv/repository/mirror/releases/server/debian/latest-server
fi
Ubuntu:
@@ -104,9 +104,9 @@ jobs:
id: version
run: |-
if [[ ${{ inputs.version }} == "master" ]]; then
- echo "VERSION=$(date +'%Y%m%d%H')" >> $GITHUB_ENV
+ echo "BUILD_VERSION=$(date +'%Y%m%d%H')" >> $GITHUB_ENV
else
- echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV
+ echo "BUILD_VERSION=${{ inputs.version }}" >> $GITHUB_ENV
fi
- name: "Install dependencies"
@@ -122,7 +122,7 @@ jobs:
- name: "Run builder for ${{ matrix.version }} ${{ matrix.arch }}"
run: |-
- sudo ./build.py ${VERSION} ubuntu ${{ matrix.arch }} ${{ matrix.release }}
+ sudo ./build.py ${BUILD_VERSION} ubuntu ${{ matrix.arch }} ${{ matrix.release }}
- name: "Upload artifacts to repository server"
uses: appleboy/scp-action@v0.1.7
@@ -132,7 +132,7 @@ jobs:
key: "${{ secrets.REPO_KEY }}"
source: "out/ubuntu/*"
strip_components: 2
- target: "/srv/incoming/${VERSION}/ubuntu/${{ matrix.arch }}/${{ matrix.release }}"
+ target: "/srv/incoming/${BUILD_VERSION}/ubuntu/${{ matrix.arch }}/${{ matrix.release }}"
- name: "Import artifacts into reprepro"
uses: appleboy/ssh-action@v1.0.3
@@ -147,8 +147,8 @@ jobs:
else
COMPONENT="unstable"
fi
- sudo reprepro --basedir /srv/ubuntu --component ${COMPONENT} includedeb ${{ matrix.release }} /srv/incoming/${VERSION}/ubuntu/${{ matrix.arch }}/${{ matrix.release }}/*.deb
- sudo reprepro --basedir /srv/ubuntu --component ${COMPONENT} includedsc ${{ matrix.release }} /srv/incoming/${VERSION}/ubuntu/${{ matrix.arch }}/${{ matrix.release }}/*.dsc
+ flock /run/lock/github-reprepro-ubuntu.lock sudo reprepro --basedir /srv/ubuntu --component ${COMPONENT} includedeb ${{ matrix.release }} /srv/incoming/${BUILD_VERSION}/ubuntu/${{ matrix.arch }}/${{ matrix.release }}/*.deb
+ flock /run/lock/github-reprepro-ubuntu.lock sudo reprepro --basedir /srv/ubuntu --component ${COMPONENT} includedsc ${{ matrix.release }} /srv/incoming/${BUILD_VERSION}/ubuntu/${{ matrix.arch }}/${{ matrix.release }}/*.dsc
- name: "Move artifacts into repository"
uses: appleboy/ssh-action@v1.0.3
@@ -157,9 +157,9 @@ jobs:
username: "${{ secrets.REPO_USER }}"
key: "${{ secrets.REPO_KEY }}"
script: |
- sudo mkdir -p /srv/repository/mirror/releases/server/ubuntu/versions/${VERSION}/${{ matrix.arch }}
- sudo mv -t /srv/repository/mirror/releases/server/ubuntu/versions/${VERSION}/${{ matrix.arch }} /srv/incoming/${VERSION}/ubuntu/${{ matrix.arch }}/${{ matrix.release }}/*
+ sudo mkdir -p /srv/repository/mirror/releases/server/ubuntu/versions/${BUILD_VERSION}/${{ matrix.arch }}
+ sudo mv -t /srv/repository/mirror/releases/server/ubuntu/versions/${BUILD_VERSION}/${{ matrix.arch }} /srv/incoming/${BUILD_VERSION}/ubuntu/${{ matrix.arch }}/${{ matrix.release }}/*
if [[ ${{ inputs.version }} != "master" ]]; then
- sudo ln -s /srv/repository/mirror/releases/server/ubuntu/versions/${VERSION}/${{ matrix.arch }} /srv/repository/mirror/releases/server/ubuntu/latest-server
+ sudo ln -s /srv/repository/mirror/releases/server/ubuntu/versions/${BUILD_VERSION}/${{ matrix.arch }} /srv/repository/mirror/releases/server/ubuntu/latest-server
fi
bgstack15