Skip to content

Commit

Permalink
[mod-misty] ci: upload to prerelease to avoid artifact expire
Browse files Browse the repository at this point in the history
  • Loading branch information
NyaMisty committed Feb 5, 2022
1 parent a054a79 commit b98e7da
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 7 deletions.
47 changes: 40 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,28 +184,28 @@ jobs:
shell: bash
run: |
make quicktest
if: matrix.quicktest
if: false

- name: Race test
shell: bash
run: |
make racequicktest
if: matrix.racequicktest
if: false

- name: Run librclone tests
shell: bash
run: |
make -C librclone/ctest test
make -C librclone/ctest clean
librclone/python/test_rclone.py
if: matrix.librclonetest
if: false

- name: Compile all architectures test
shell: bash
run: |
make
make compile_all
if: matrix.compile_all
if: false

- name: Deploy built binaries
shell: bash
Expand All @@ -218,14 +218,15 @@ jobs:
rm rclonebuild/*latest*
env:
RCLONE_CONFIG_PASS: ${{ secrets.RCLONE_CONFIG_PASS }}
# working-directory: '$(modulePath)'
# Deploy binaries if enabled in config && not a PR && not a fork
#if: matrix.deploy && github.head_ref == '' && github.repository == 'rclone/rclone'

- name: "Upload to github artifact"
if: ${{ always() }}
uses: NyaMisty/upload-artifact-as-is@nightly
with:
path: rclonebuild
# working-directory: '$(modulePath)'
# Deploy binaries if enabled in config && not a PR && not a fork
#if: matrix.deploy && github.head_ref == '' && github.repository == 'rclone/rclone'

lint:
if: ${{ github.repository == 'rclone/rclone' || github.event.inputs.manual }}
Expand Down Expand Up @@ -359,3 +360,35 @@ jobs:
uses: NyaMisty/upload-artifact-as-is@nightly
with:
path: build


release:
name: "release"
timeout-minutes: 60
runs-on: ubuntu-latest
needs: [build, android]
if: always()
steps:
- name: "Create artifact directory"
run: |
mkdir -p rclonebuild
- name: "Download all artifacts"
uses: actions/download-artifact@v2
with:
path: rclonebuild
- name: "Ensure at lease one build succeeded"
run: |
ls rclonebuild
if [ "$(ls -A rclonebuild)" ]; then exit 0; else exit 1; fi
- name: "Upload to Github Prerelease"
uses: ncipollo/release-action@v1
with:
artifacts: "rclonebuild/*"
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ format('AutoBuild - {0}', github.event.commits[0].message) }}
tag: "action_build"
commit: master
prerelease: true
allowUpdates: true
removeArtifacts: true
artifactErrorsFailBuild: true
39 changes: 39 additions & 0 deletions .github/workflows/fetch_upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Scheduled Merge Remote Action
on:
schedule:
- cron: '20 * * * *'
# scheduled for 00:00 everyday
workflow_dispatch:

jobs:
merge-upstream:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: master # set the branch to merge to
fetch-depth: 0
- name: Setup committer
run: |
git config --global user.email "misty@misty.moe"
git config --global user.name "NyaMisty"
- name: Merge Upstream
run: |
git remote add -f upstream "https://github.com/rclone/rclone" &&
git remote -v &&
git branch --all &&
git config --list &&
git checkout master
git rebase -v --fork-point --rebase-merges --keep-base master upstream/master
git rebase --abort || true;
git branch -f master HEAD; git checkout master
#- name: Prepare to push
# run: git branch -f master
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.WORKER_GITHUB_PAT }}
branch: ${{ github.ref }}
- uses: gautamkrishnar/keepalive-workflow@master # using the workflow with default settings

0 comments on commit b98e7da

Please sign in to comment.