diff options
author | Joshua M. Boniface <joshua@boniface.me> | 2024-02-12 02:18:49 -0500 |
---|---|---|
committer | Joshua M. Boniface <joshua@boniface.me> | 2024-02-12 02:18:49 -0500 |
commit | 6930e963a162d9b1747329895a129ed3efc283e7 (patch) | |
tree | 46de8018bbe684072c8e0f1f64f29a907d2d1ba1 /.github/workflows/release-build.yaml | |
parent | Use input version for comparisons (diff) | |
download | jellyfin-packaging-6930e963a162d9b1747329895a129ed3efc283e7.tar.gz jellyfin-packaging-6930e963a162d9b1747329895a129ed3efc283e7.tar.bz2 jellyfin-packaging-6930e963a162d9b1747329895a129ed3efc283e7.zip |
Use environment files instead of outputs
Diffstat (limited to '.github/workflows/release-build.yaml')
-rw-r--r-- | .github/workflows/release-build.yaml | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/.github/workflows/release-build.yaml b/.github/workflows/release-build.yaml index a9698a6..c33280f 100644 --- a/.github/workflows/release-build.yaml +++ b/.github/workflows/release-build.yaml @@ -26,7 +26,12 @@ jobs: steps: - name: "Set dated version for unstable builds" id: version - run: if [[ ${{ inputs.version }} == "master" ]]; then echo "::set-output name=version::$(date +'%Y%m%d%H')"; else echo "::set-output name=version::${{ inputs.version }}"; fi + run: |- + if [[ ${{ inputs.version }} == "master" ]]; then + echo "VERSION=$(date +'%Y%m%d%H')" >> $GITHUB_ENV + else + echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV + fi - name: "Install dependencies" run: |- @@ -41,7 +46,7 @@ jobs: - name: "Run builder for ${{ matrix.version }} ${{ matrix.arch }}" run: |- - sudo ./build.py ${{ steps.version.outputs.version }} debian ${{ matrix.arch }} ${{ matrix.release }} + sudo ./build.py ${VERSION} debian ${{ matrix.arch }} ${{ matrix.release }} - name: "Upload artifacts to repository server" uses: appleboy/scp-action@v0.1.7 @@ -51,7 +56,7 @@ jobs: key: "${{ secrets.REPO_KEY }}" source: "out/debian/*" strip_components: 2 - target: "/srv/incoming/${{ steps.version.outputs.version }}/debian/${{ matrix.arch }}/${{ matrix.release }}" + target: "/srv/incoming/${VERSION}/debian/${{ matrix.arch }}/${{ matrix.release }}" - name: "Import artifacts into reprepro" uses: appleboy/ssh-action@v1.0.3 @@ -66,8 +71,8 @@ jobs: else COMPONENT="unstable" fi - sudo reprepro --basedir /srv/debian --component ${COMPONENT} includedeb ${{ matrix.release }} /srv/incoming/${{ steps.version.outputs.version }}/debian/${{ matrix.arch }}/${{ matrix.release }}/*.deb - sudo reprepro --basedir /srv/debian --component ${COMPONENT} includedsc ${{ matrix.release }} /srv/incoming/${{ steps.version.outputs.version }}/debian/${{ matrix.arch }}/${{ matrix.release }}/*.dsc + 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 - name: "Move artifacts into repository" uses: appleboy/ssh-action@v1.0.3 @@ -76,10 +81,10 @@ jobs: username: "${{ secrets.REPO_USER }}" key: "${{ secrets.REPO_KEY }}" script: | - sudo mkdir -p /srv/repository/mirror/releases/server/debian/versions/${{ steps.version.outputs.version }}/${{ matrix.arch }} - sudo mv -t /srv/repository/mirror/releases/server/debian/versions/${{ steps.version.outputs.version }}/${{ matrix.arch }}/ /srv/incoming/${{ steps.version.outputs.version }}/debian/${{ matrix.arch }}/${{ matrix.release }}/* + 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 }}/* if [[ ${{ inputs.version }} != "master" ]]; then - sudo ln -s /srv/repository/mirror/releases/server/debian/versions/${{ steps.version.outputs.version }}/${{ matrix.arch }} /srv/repository/mirror/releases/server/debian/latest-server + sudo ln -s /srv/repository/mirror/releases/server/debian/versions/${VERSION}/${{ matrix.arch }} /srv/repository/mirror/releases/server/debian/latest-server fi Ubuntu: @@ -97,7 +102,12 @@ jobs: steps: - name: "Set dated version for unstable builds" id: version - run: if [[ ${{ inputs.version }} == "master" ]]; then echo "::set-output name=version::$(date +'%Y%m%d%H')"; else echo "::set-output name=version::${{ inputs.version }}"; fi + run: |- + if [[ ${{ inputs.version }} == "master" ]]; then + echo "VERSION=$(date +'%Y%m%d%H')" >> $GITHUB_ENV + else + echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV + fi - name: "Install dependencies" run: |- @@ -112,7 +122,7 @@ jobs: - name: "Run builder for ${{ matrix.version }} ${{ matrix.arch }}" run: |- - sudo ./build.py ${{ steps.version.outputs.version }} ubuntu ${{ matrix.arch }} ${{ matrix.release }} + sudo ./build.py ${VERSION} ubuntu ${{ matrix.arch }} ${{ matrix.release }} - name: "Upload artifacts to repository server" uses: appleboy/scp-action@v0.1.7 @@ -122,7 +132,7 @@ jobs: key: "${{ secrets.REPO_KEY }}" source: "out/ubuntu/*" strip_components: 2 - target: "/srv/incoming/${{ steps.version.outputs.version }}/ubuntu/${{ matrix.arch }}/${{ matrix.release }}" + target: "/srv/incoming/${VERSION}/ubuntu/${{ matrix.arch }}/${{ matrix.release }}" - name: "Import artifacts into reprepro" uses: appleboy/ssh-action@v1.0.3 @@ -137,8 +147,8 @@ jobs: else COMPONENT="unstable" fi - sudo reprepro --basedir /srv/ubuntu --component ${COMPONENT} includedeb ${{ matrix.release }} /srv/incoming/${{ steps.version.outputs.version }}/ubuntu/${{ matrix.arch }}/${{ matrix.release }}/*.deb - sudo reprepro --basedir /srv/ubuntu --component ${COMPONENT} includedsc ${{ matrix.release }} /srv/incoming/${{ steps.version.outputs.version }}/ubuntu/${{ matrix.arch }}/${{ matrix.release }}/*.dsc + 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 - name: "Move artifacts into repository" uses: appleboy/ssh-action@v1.0.3 @@ -147,9 +157,9 @@ jobs: username: "${{ secrets.REPO_USER }}" key: "${{ secrets.REPO_KEY }}" script: | - sudo mkdir -p /srv/repository/mirror/releases/server/ubuntu/versions/${{ steps.version.outputs.version }}/${{ matrix.arch }} - sudo mv -t /srv/repository/mirror/releases/server/ubuntu/versions/${{ steps.version.outputs.version }}/${{ matrix.arch }} /srv/incoming/${{ steps.version.outputs.version }}/ubuntu/${{ matrix.arch }}/${{ matrix.release }}/* + 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 }}/* if [[ ${{ inputs.version }} != "master" ]]; then - sudo ln -s /srv/repository/mirror/releases/server/ubuntu/versions/${{ steps.version.outputs.version }}/${{ matrix.arch }} /srv/repository/mirror/releases/server/ubuntu/latest-server + sudo ln -s /srv/repository/mirror/releases/server/ubuntu/versions/${VERSION}/${{ matrix.arch }} /srv/repository/mirror/releases/server/ubuntu/latest-server fi |