Update workflows to replace deprecated bits.
This commit is contained in:
parent
d9aafe51a6
commit
624a3fe503
4 changed files with 24 additions and 24 deletions
12
.github/workflows/build-dev.yaml
vendored
12
.github/workflows/build-dev.yaml
vendored
|
@ -26,27 +26,27 @@ jobs:
|
||||||
if [[ -z "$branch_arg" ]]; then
|
if [[ -z "$branch_arg" ]]; then
|
||||||
branch_arg="$GITHUB_REF_NAME"
|
branch_arg="$GITHUB_REF_NAME"
|
||||||
fi
|
fi
|
||||||
echo "::set-output name=branch::$branch_arg"
|
echo "name=branch::$branch_arg" >> $GITHUB_OUTPUT
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
name: checkout
|
name: checkout
|
||||||
with:
|
with:
|
||||||
clean: false
|
clean: false
|
||||||
ref: "${{ steps.branch.outputs.branch }}"
|
ref: "${{ steps.branch.outputs.branch }}"
|
||||||
- name: Get date for artifacts
|
- name: Get date for artifacts
|
||||||
id: date
|
id: date
|
||||||
run: echo "::set-output name=date::$(date +'%Y%m%d%H%M')"
|
run: echo "name=date::$(date +'%Y%m%d%H%M')" >> $GITHUB_OUTPUT
|
||||||
- name: Get short SHA for artifacts
|
- name: Get short SHA for artifacts
|
||||||
id: sha
|
id: sha
|
||||||
run: echo "::set-output name=sha::$(git rev-parse --short HEAD)"
|
run: echo "name=sha::$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
- name: Get dev version
|
- name: Get dev version
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
echo "full name: ${{ github.event.repository.full_name }}"
|
echo "full name: ${{ github.event.repository.full_name }}"
|
||||||
if [[ "${{ github.event.client_payload.release_tag }}" != "" ]]; then
|
if [[ "${{ github.event.client_payload.release_tag }}" != "" ]]; then
|
||||||
echo "::set-output name=version::${{ github.event.client_payload.release_tag }}"
|
echo "name=version::${{ github.event.client_payload.release_tag }}" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "::set-output name=version::${{ steps.date.outputs.date }}-${{ steps.sha.outputs.sha }}"
|
echo "name=version::${{ steps.date.outputs.date }}-${{ steps.sha.outputs.sha }}" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
- name: Build World
|
- name: Build World
|
||||||
run: |
|
run: |
|
||||||
|
|
12
.github/workflows/build-main.yaml
vendored
12
.github/workflows/build-main.yaml
vendored
|
@ -26,27 +26,27 @@ jobs:
|
||||||
if [[ -z "$branch_arg" ]]; then
|
if [[ -z "$branch_arg" ]]; then
|
||||||
branch_arg="$GITHUB_REF_NAME"
|
branch_arg="$GITHUB_REF_NAME"
|
||||||
fi
|
fi
|
||||||
echo "::set-output name=branch::$branch_arg"
|
echo "name=branch::$branch_arg" >> $GITHUB_OUTPUT
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
name: checkout
|
name: checkout
|
||||||
with:
|
with:
|
||||||
clean: false
|
clean: false
|
||||||
ref: "${{ steps.branch.outputs.branch }}"
|
ref: "${{ steps.branch.outputs.branch }}"
|
||||||
- name: Get date for artifacts
|
- name: Get date for artifacts
|
||||||
id: date
|
id: date
|
||||||
run: echo "::set-output name=date::$(date +'%Y%m%d')"
|
run: echo "name=date::$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
|
||||||
- name: Get short SHA for artifacts
|
- name: Get short SHA for artifacts
|
||||||
id: sha
|
id: sha
|
||||||
run: echo "::set-output name=sha::$(git rev-parse --short HEAD)"
|
run: echo "name=sha::$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||||
- name: Get version
|
- name: Get version
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
echo "full name: ${{ github.event.repository.full_name }}"
|
echo "full name: ${{ github.event.repository.full_name }}"
|
||||||
if [[ "${{ github.event.client_payload.release_tag }}" != "" ]]; then
|
if [[ "${{ github.event.client_payload.release_tag }}" != "" ]]; then
|
||||||
echo "::set-output name=version::${{ github.event.client_payload.release_tag }}"
|
echo "name=version::${{ github.event.client_payload.release_tag }}" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "::set-output name=version::${{ steps.date.outputs.date }}-${{ steps.sha.outputs.sha }}"
|
echo "name=version::${{ steps.date.outputs.date }}-${{ steps.sha.outputs.sha }}" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
- name: Build World
|
- name: Build World
|
||||||
run: |
|
run: |
|
||||||
|
|
12
.github/workflows/release-dev.yaml
vendored
12
.github/workflows/release-dev.yaml
vendored
|
@ -19,7 +19,7 @@ jobs:
|
||||||
${{ github.event_name == 'workflow_dispatch' }} ||
|
${{ github.event_name == 'workflow_dispatch' }} ||
|
||||||
${{ github.event.label.name == 'build' }}
|
${{ github.event.label.name == 'build' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
name: checkout
|
name: checkout
|
||||||
with:
|
with:
|
||||||
clean: false
|
clean: false
|
||||||
|
@ -33,7 +33,7 @@ jobs:
|
||||||
- name: repository full name
|
- name: repository full name
|
||||||
id: full_name
|
id: full_name
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=full_name::$(git config --get remote.origin.url | sed 's|^.*github.com/||g' | sed 's/.git$//g')"
|
echo "name=full_name::$(git config --get remote.origin.url | sed 's|^.*github.com/||g' | sed 's/.git$//g')" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: changes
|
- name: changes
|
||||||
id: changes
|
id: changes
|
||||||
|
@ -42,21 +42,21 @@ jobs:
|
||||||
release_notes="${release_notes//'%'/'%25'}"
|
release_notes="${release_notes//'%'/'%25'}"
|
||||||
release_notes="${release_notes//$'\n'/'%0A'}"
|
release_notes="${release_notes//$'\n'/'%0A'}"
|
||||||
release_notes="${release_notes//$'\r'/'%0D'}"
|
release_notes="${release_notes//$'\r'/'%0D'}"
|
||||||
echo ::set-output name=release_notes::${release_notes}
|
echo "name=release_notes::${release_notes}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: change_counter
|
- name: change_counter
|
||||||
id: counter
|
id: counter
|
||||||
run: |
|
run: |
|
||||||
count="$(git log --after "$(date -d "yesterday" +%Y-%m-%d)" --pretty=format:"* %h: %s" | wc -l)"
|
count="$(git log --after "$(date -d "yesterday" +%Y-%m-%d)" --pretty=format:"* %h: %s" | wc -l)"
|
||||||
echo "::set-output name=count::${count}"
|
echo "name=count::${count}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Get date for artifacts
|
- name: Get date for artifacts
|
||||||
id: date
|
id: date
|
||||||
run: echo "::set-output name=date::$(date +'%Y%m%d%H%M')"
|
run: echo "name=date::$(date +'%Y%m%d%H%M')" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Repository Dispatch
|
- name: Repository Dispatch
|
||||||
if: steps.counter.outputs.count != '0'
|
if: steps.counter.outputs.count != '0'
|
||||||
uses: peter-evans/repository-dispatch@v1
|
uses: peter-evans/repository-dispatch@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.REPO_ACCESS }}
|
token: ${{ secrets.REPO_ACCESS }}
|
||||||
repository: ${{ steps.full_name.outputs.full_name }}
|
repository: ${{ steps.full_name.outputs.full_name }}
|
||||||
|
|
12
.github/workflows/release-main.yaml
vendored
12
.github/workflows/release-main.yaml
vendored
|
@ -26,7 +26,7 @@ jobs:
|
||||||
launch-main-release-if-needed:
|
launch-main-release-if-needed:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
name: checkout
|
name: checkout
|
||||||
with:
|
with:
|
||||||
clean: false
|
clean: false
|
||||||
|
@ -40,7 +40,7 @@ jobs:
|
||||||
- name: repository full name
|
- name: repository full name
|
||||||
id: full_name
|
id: full_name
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=full_name::$(git config --get remote.origin.url | sed 's|^.*github.com/||g' | sed 's/.git$//g')"
|
echo "name=full_name::$(git config --get remote.origin.url | sed 's|^.*github.com/||g' | sed 's/.git$//g')" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: changes
|
- name: changes
|
||||||
id: changes
|
id: changes
|
||||||
|
@ -50,15 +50,15 @@ jobs:
|
||||||
release_notes="${release_notes//'%'/'%25'}"
|
release_notes="${release_notes//'%'/'%25'}"
|
||||||
release_notes="${release_notes//$'\n'/'%0A'}"
|
release_notes="${release_notes//$'\n'/'%0A'}"
|
||||||
release_notes="${release_notes//$'\r'/'%0D'}"
|
release_notes="${release_notes//$'\r'/'%0D'}"
|
||||||
echo "::set-output name=changes::$(echo ${release_notes} | wc -l)"
|
echo "name=changes::$(echo ${release_notes} | wc -l)" >> $GITHUB_OUTPUT
|
||||||
echo "::set-output name=release_notes::${release_notes}"
|
echo "name=release_notes::${release_notes}" >> $GITHUB_OUTPUT
|
||||||
- name: Get date for artifacts
|
- name: Get date for artifacts
|
||||||
id: date
|
id: date
|
||||||
run: echo "::set-output name=date::$(date +'%Y%m%d')"
|
run: echo "name=date::$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Repository Dispatch
|
- name: Repository Dispatch
|
||||||
if: steps.changes.outputs.changes != '0'
|
if: steps.changes.outputs.changes != '0'
|
||||||
uses: peter-evans/repository-dispatch@v1
|
uses: peter-evans/repository-dispatch@v2
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.REPO_ACCESS }}
|
token: ${{ secrets.REPO_ACCESS }}
|
||||||
repository: ${{ steps.full_name.outputs.full_name }}
|
repository: ${{ steps.full_name.outputs.full_name }}
|
||||||
|
|
Loading…
Reference in a new issue