Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OP#47869]Update github actions packages #395

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 13 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:

name: CI

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
unittest-linting:
name: unit tests and linting
Expand All @@ -26,25 +30,19 @@ jobs:
phpVersion: 7.4
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
all_but_latest: true
access_token: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP ${{ matrix.phpVersion }}
uses: shivammathur/setup-php@2.23.0
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.phpVersion }}
tools: composer, phpunit
coverage: xdebug

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache PHP dependencies
uses: actions/cache@v3
Expand All @@ -54,14 +52,14 @@ jobs:
restore-keys: ${{ runner.os }}-composer-

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@v1.2
uses: skjnldsv/read-package-engines-version-actions@v2
id: versions
with:
fallbackNode: '^14'
fallbackNpm: '^7'

- name: Setup NodeJS ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
cache: 'npm'
Expand Down Expand Up @@ -224,34 +222,28 @@ jobs:
image: redis:7

steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
all_but_latest: true
access_token: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: integration_openproject

- name: Checkout activity app
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: nextcloud/activity
path: activity
ref: ${{ matrix.nextcloudVersion }}

- name: Setup PHP ${{ format('{0}.{1}', matrix.phpVersionMajor,matrix.phpVersionMinor) }}
uses: shivammathur/setup-php@2.23.0
uses: shivammathur/setup-php@v2
with:
php-version: ${{ format('{0}.{1}', matrix.phpVersionMajor,matrix.phpVersionMinor) }}
tools: composer
extensions: intl

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache PHP dependencies
uses: actions/cache@v3
Expand Down
24 changes: 9 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Use Node 14
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 14

Expand All @@ -30,7 +30,7 @@ jobs:
tools: php-cs-fixer, phpunit

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get current tag
id: tag
Expand All @@ -39,13 +39,13 @@ jobs:
tag=$(git tag -l --points-at HEAD)
echo CURRENT TAG IS '"'${tag}'"' '!!!!'
vtag=$(echo $tag | grep "^v[0-9]\+\.[0-9]\+\.[0-9]\+" || echo "")
echo "##[set-output name=currenttag;]$vtag"
echo "currenttag=$vtag" >> $GITHUB_OUTPUT

- name: Build project
if: ${{ startsWith( steps.tag.outputs.currenttag , 'v' ) }}
id: build_release
run: |
echo "##[set-output name=app_id;]$APP_ID"
echo "app_id=$APP_ID" >> $GITHUB_OUTPUT
echo "###### copy certificate"
mkdir -p ~/.nextcloud/certificates
echo "$APP_CRT" > ~/.nextcloud/certificates/${APP_ID}.crt
Expand All @@ -69,34 +69,28 @@ jobs:
tag=${{ steps.tag.outputs.currenttag }}
version=${tag/v/}
webserveruser=runner occ_dir=~/html/nextcloud version=$version make appstore
echo "##[set-output name=version;]$version"
echo "version=$version" >> $GITHUB_OUTPUT
env:
APP_CRT: ${{ secrets.APP_CRT }}
APP_KEY: ${{ secrets.APP_KEY }}

- name: Create Release
if: ${{ startsWith( steps.tag.outputs.currenttag , 'v' ) }}
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag.outputs.currenttag }}
release_name: ${{ steps.tag.outputs.currenttag }}
name: ${{ steps.tag.outputs.currenttag }}
draft: false
prerelease: false

- name: Upload Release Asset
if: ${{ startsWith( steps.tag.outputs.currenttag , 'v' ) }}
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /tmp/build/${{ steps.build_release.outputs.app_id }}-${{ steps.build_release.outputs.version }}.tar.gz
asset_name: ${{ steps.build_release.outputs.app_id }}-${{ steps.build_release.outputs.version }}.tar.gz
asset_content_type: application/gzip
files: /tmp/build/${{ steps.build_release.outputs.app_id }}-${{ steps.build_release.outputs.version }}.tar.gz

- name: Publish to appstore
if: ${{ startsWith( steps.tag.outputs.currenttag , 'v' ) && !endsWith( steps.tag.outputs.currenttag , 'nightly' ) }}
Expand Down