-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
100 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: opensuse images release | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- '**' | ||
schedule: | ||
- cron: "59 23 * * *" | ||
|
||
jobs: | ||
once: | ||
runs-on: ubuntu-20.04 | ||
name: Create GitHub release | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }}${{ steps.create_nightly.outputs.upload_url }} | ||
|
||
steps: | ||
- name: Create Release | ||
id: create_release | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: true | ||
prerelease: false | ||
|
||
- uses: dev-drprasad/delete-tag-and-release@v0.1.3 | ||
if: startsWith(github.ref, 'refs/tags/v') != true | ||
with: | ||
delete_release: true # default: false | ||
tag_name: nightly # tag name to delete | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Tag snapshot | ||
if: startsWith(github.ref, 'refs/tags/v') != true | ||
uses: tvdias/github-tagger@v0.0.1 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: nightly | ||
|
||
- name: Create Release | ||
id: create_nightly | ||
if: startsWith(github.ref, 'refs/tags/v') != true | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: nightly | ||
release_name: nightly | ||
draft: false | ||
prerelease: true | ||
|
||
build: | ||
runs-on: ubuntu-20.04 | ||
needs: once | ||
|
||
steps: | ||
- name: Get current date | ||
run: echo "current_date=$(date +'%Y%m%d')" >> $GITHUB_ENV | ||
|
||
- name: Set suffix | ||
run: echo "release_suffix=_${{ env.current_date }}" >> $GITHUB_ENV | ||
|
||
- name: Set nightly version | ||
if: startsWith(github.ref, 'refs/tags/v') != true | ||
run: echo "version=nightly" >> $GITHUB_ENV | ||
|
||
- name: Set version | ||
if: startsWith(github.ref, 'refs/tags/v') == true | ||
run: echo "version=$(echo ${{ github.ref }} | rev | cut -d'/' -f1 | rev)" >> $GITHUB_ENV | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Create build dir | ||
run: mkdir -p /tmp/build-results | ||
|
||
- name: Download official rootfs | ||
run: wget -P data/ https://download.opensuse.org/repositories/home:/alefnode:/GSI-Phone/images/openSUSE-Tumbleweed-ARM-PHOSH.aarch64-gsi-volla-yggdrasil.aarch64.tar.xz | ||
|
||
- name: Create ZIP file to flash with Recovery | ||
run: zip -r /tmp/build-results/openSUSE-Tumbleweed-ARM-PHOSH.aarch64-gsi-volla-yggdrasil.aarch64-${{ env.release_suffix }}.zip * | ||
|
||
- name: Upload Rootfs image | ||
id: upload-rootfs | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.once.outputs.upload_url }} | ||
asset_path: /tmp/build-results/openSUSE-Tumbleweed-ARM-PHOSH.aarch64-gsi-volla-yggdrasil.aarch64-${{ env.release_suffix }}.zip | ||
asset_name: openSUSE-Tumbleweed-ARM-PHOSH.aarch64-gsi-volla-yggdrasil.aarch64-${{ env.release_suffix }}.zip | ||
asset_content_type: application/gzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
*.xz | ||
*.xz | ||
*.zip |