Skip to content

Commit

Permalink
ci: auto build docker with aria2
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Jan 27, 2023
1 parent b52e874 commit c92e11d
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 4 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
build_docker:
name: Docker
name: Build docker
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -36,4 +36,30 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64

build_docker_with_aria2:
needs: build_docker
name: Build docker with aria2
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
repository: alist-org/with_aria2
ref: main
persist-credentials: false
fetch-depth: 0

- name: Commit
run: |
git config --local user.email "[email protected]"
git config --local user.name "Noah Hsu"
git commit --allow-empty -m "Trigger build for ${{ github.sha }}"
- name: Push commit
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.MY_TOKEN }}
branch: main
repository: alist-org/with_aria2
30 changes: 28 additions & 2 deletions .github/workflows/release_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
release_docker:
name: Docker
name: Release Docker
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -39,4 +39,30 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/arm/v6,linux/s390x
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386,linux/arm/v6,linux/s390x

release_docker_with_aria2:
needs: release_docker
name: Release docker with aria2
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
repository: alist-org/with_aria2
ref: main
persist-credentials: false
fetch-depth: 0

- name: Add tag
run: |
git config --local user.email "[email protected]"
git config --local user.name "Noah Hsu"
git tag -a ${{ github.ref_name }} -m "release ${{ github.ref_name }}"
- name: Push tags
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.MY_TOKEN }}
branch: main
repository: alist-org/with_aria2

0 comments on commit c92e11d

Please sign in to comment.