Skip to content

Commit

Permalink
try fix for set-output deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
dadleyy committed Nov 8, 2022
1 parent d592ce0 commit 015a720
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- name: "set output: short_sha"
id: vars
run: echo "::set-output name=sha_short::$(echo $GITHUB_SHA | head -c 7)"
run: echo "sha_short=$(echo $GITHUB_SHA | head -c 7) >> $GITHUB_ENV"

- name: "apt update"
run: sudo apt-get update
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:

- name: "build - make release"
run: make release \
VERSION=${{ steps.vars.outputs.sha_short }} \
VERSION=${{ env.sha_short }} \
LOGIN_URL=${{ env.LOGIN_URL }} \
API_ROOT=${{ env.API_ROOT }} \
LOGOUT_URL=${{ env.LOGOUT_URL }} \
Expand All @@ -69,12 +69,12 @@ jobs:
- name: "bundle - populate"
run: cp -r target/release milton-ui-dist
- name: "bundle - create"
run: tar cvzf milton-ui-${{ steps.vars.outputs.sha_short }}.tar.gz milton-ui-dist
run: tar cvzf milton-ui-${{ env.sha_short }}.tar.gz milton-ui-dist

- uses: actions/upload-artifact@v3
with:
name: milton-ui-${{ steps.vars.outputs.sha_short }}.tar.gz
path: src/milton-ui/milton-ui-${{ steps.vars.outputs.sha_short }}.tar.gz
name: milton-ui-${{ env.sha_short }}.tar.gz
path: src/milton-ui/milton-ui-${{ env.sha_short }}.tar.gz

# rust middleware compilation
build-web:
Expand All @@ -91,7 +91,7 @@ jobs:
run: git --version
- name: "set output: short_sha"
id: vars
run: echo "::set-output name=sha_short::$(echo $GITHUB_SHA | head -c 7)"
run: echo "sha_short=$(echo $GITHUB_SHA | head -c 7) >> $GITHUB_ENV"

- name: "apt - update"
run: apt-get update
Expand All @@ -113,35 +113,37 @@ jobs:
env:
OPENSSL_LIB_DIR: /etc/arm-dependencies/openssl-3.0.7
OPENSSL_INCLUDE_DIR: /etc/arm-dependencies/openssl-3.0.7/include
MILTON_VERSION: "${{ steps.vars.outputs.sha_short }}"
MILTON_VERSION: "${{ env.sha_short }}"

# bundling + artifact generation:
- name: "bundle - prepare"
run: mkdir -p milton-web-dist/bin
- name: "bundle - populate"
run: cp target/aarch64-unknown-linux-gnu/release/milton milton-web-dist/bin/milton
- name: "bundle - create"
run: tar cvzf milton-web-aarch64-unknown-linux-gnu-${{ steps.vars.outputs.sha_short }}.tar.gz milton-web-dist
run: tar cvzf milton-web-aarch64-unknown-linux-gnu-${{ env.sha_short }}.tar.gz milton-web-dist

- uses: actions/upload-artifact@v3
with:
name: milton-web-aarch64-unknown-linux-gnu-${{ steps.vars.outputs.sha_short }}.tar.gz
path: src/milton-web/milton-web-aarch64-unknown-linux-gnu-${{ steps.vars.outputs.sha_short }}.tar.gz
name: milton-web-aarch64-unknown-linux-gnu-${{ env.sha_short }}.tar.gz
path: src/milton-web/milton-web-aarch64-unknown-linux-gnu-${{ env.sha_short }}.tar.gz

publish:
runs-on: ubuntu-latest
needs: ["build-ui", "build-web"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: "set output: short_sha"
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
run: echo "sha_short=$(echo $GITHUB_SHA | head -c 7) >> $GITHUB_ENV"

- uses: actions/download-artifact@v3
with:
name: "milton-web-aarch64-unknown-linux-gnu-${{ steps.vars.outputs.sha_short }}.tar.gz"
name: "milton-web-aarch64-unknown-linux-gnu-${{ env.sha_short }}.tar.gz"
- uses: actions/download-artifact@v3
with:
name: "milton-ui-${{ steps.vars.outputs.sha_short }}.tar.gz"
name: "milton-ui-${{ env.sha_short }}.tar.gz"
- name: release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
Expand Down

0 comments on commit 015a720

Please sign in to comment.