Skip to content

Commit ec7861b

Browse files
committed
Update universal build
1 parent 0eb174c commit ec7861b

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
FROM mltooling/build-environment:0.6.6
1+
FROM mltooling/build-environment:0.6.12

.github/workflows/build-pipeline.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Based on https://github.com/ml-tooling/universal-build/blob/v0.6.12/workflows/build-pipeline.yml
12
name: build-pipeline
23

34
on:
@@ -10,27 +11,27 @@ on:
1011
description: "Working directory from where the build command is run"
1112
required: false
1213
push:
14+
pull_request:
1315

1416
env:
1517
BUILD_ARGS: ${{ secrets.BUILD_ARGS }}
1618
WORKING_DIRECTORY: ${{ secrets.WORKING_DIRECTORY }}
17-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true # TODO: only needed until act supports the new way
1819

1920
jobs:
2021
build:
2122
runs-on: ubuntu-latest
2223
steps:
2324
- name: set-input-build-args
2425
if: ${{ github.event.inputs != null && github.event.inputs.build_args != null}}
25-
run: echo "::set-env name=BUILD_ARGS::${{ github.event.inputs.build_args }}"
26+
run: echo "BUILD_ARGS=${{ github.event.inputs.build_args }}" >> $GITHUB_ENV
2627
# new syntax: run: echo "BUILD_ARGS=${{ github.event.inputs.build_args }}" >> "$GITHUB_ENV"
2728
- name: set-input-working-directory
2829
if: ${{ github.event.inputs != null && github.event.inputs.working_directory != null}}
29-
run: echo "::set-env name=WORKING_DIRECTORY::${{ github.event.inputs.working_directory }}"
30+
run: echo "WORKING_DIRECTORY=${{ github.event.inputs.working_directory }}" >> $GITHUB_ENV
3031
# new syntax: run: echo "WORKING_DIRECTORY=${{ github.event.inputs.working_directory }}" >> "$GITHUB_ENV"
3132
# Set host ip to env variable to be uside within container actions
3233
- name: set-host-ip
33-
run: echo "::set-env name=_HOST_IP::$(hostname -I | cut -d ' ' -f 1)"
34+
run: echo "_HOST_IP=$(hostname -I | cut -d ' ' -f 1)" >> $GITHUB_ENV
3435
- uses: actions/checkout@v2
3536
- name: run-build-scripts
3637
uses: ./.github/actions/build-environment

.github/workflows/release-pipeline.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Based on https://github.com/ml-tooling/universal-build/blob/v0.6.12/workflows/build-pipeline.yml
12
name: release-pipeline
23

34
on:
@@ -12,7 +13,6 @@ on:
1213
env:
1314
VERSION: ${{ secrets.VERSION }}
1415
BRANCH_PREFIX: "release/v"
15-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true # TODO: only needed until act supports the new way
1616
DEFAULT_BRANCH: main
1717

1818
jobs:
@@ -22,18 +22,18 @@ jobs:
2222
- if: ${{ github.event.milestone != null && github.event.milestone.title != null }}
2323
name: set-milestone-version
2424
run: |
25-
echo "::set-env name=VERSION::$(sed "s/^v//" <<< "${{ github.event.milestone.title }}")"
26-
echo "::set-env name=PR_MILESTONE_LINK::-M ${{ github.event.milestone.title }}"
25+
echo "VERSION=$(sed "s/^v//" <<< "${{ github.event.milestone.title }}")" >> $GITHUB_ENV
26+
echo "PR_MILESTONE_LINK=-M ${{ github.event.milestone.title }}" >> $GITHUB_ENV
2727
- if: ${{ github.event.inputs != null && github.event.inputs.version != null }}
2828
name: set-input-version
29-
run: echo "::set-env name=VERSION::${{ github.event.inputs.version }}"
29+
run: echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
3030
- name: check-version
3131
run: 'if [[ ! "${{ env.VERSION }}" =~ ^([0-9]+\.[0-9]+\.[0-9]+.*)$ ]]; then echo "The version is not valid: ${{ env.VERSION }}"; exit 1; fi'
3232
- name: set-github-token
33-
run: echo "::set-env name=GITHUB_TOKEN::${{ secrets.GITHUB_TOKEN }}"
33+
run: echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
3434
# Set host ip to env variable to be uside within container actions
3535
- name: set-host-ip
36-
run: echo "::set-env name=_HOST_IP::$(hostname -I | cut -d ' ' -f 1)"
36+
run: echo "_HOST_IP=$(hostname -I | cut -d ' ' -f 1)" >> $GITHUB_ENV
3737
# Fix git version for act if github token is provided
3838
- if: ${{ env.GITHUB_ACTOR == 'nektos/act' && env.GITHUB_TOKEN != null && env.GITHUB_TOKEN != '' }}
3939
name: install-latest-git

0 commit comments

Comments
 (0)