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

[Enhancement] Create GHA Workflow for cargo update #181

Merged
merged 2 commits into from
May 22, 2023
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
78 changes: 78 additions & 0 deletions .github/workflows/cargo-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
######################## GNU General Public License 3.0 ########################
## ##
## Copyright (C) 2023 Kevin Matthes ##
## ##
## This program is free software: you can redistribute it and/or modify ##
## it under the terms of the GNU General Public License as published by ##
## the Free Software Foundation, either version 3 of the License, or ##
## (at your option) any later version. ##
## ##
## This program is distributed in the hope that it will be useful, ##
## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
## GNU General Public License for more details. ##
## ##
## You should have received a copy of the GNU General Public License ##
## along with this program. If not, see <https://www.gnu.org/licenses/>. ##
## ##
################################################################################

################################################################################
##
## AUTHOR Kevin Matthes
## BRIEF Run `cargo update` and create a PR for the changes.
## COPYRIGHT GPL-3.0
## DATE 2023
## FILE cargo-update.yml
## NOTE See `LICENSE' for full license.
## See `README.md' for project details.
##
################################################################################

name: cargo-update

on:
workflow_dispatch:

permissions:
contents: read
pull-requests: write

jobs:
run:
name: run
runs-on: ubuntu-latest
steps:
- name: rustup
run: rustup update

- name: checkout
uses: actions/checkout@v3.5.2
with:
persist-credentials: false

- name: user
uses: fregante/setup-git-user@v2.0.1

- name: cargo
run: \
cargo update \
&& git add . \
&& git commit --allow-empty -m \
"[`git config --list \
| grep user\.name \
| cut -d= -f2`] cargo update"

- name: pr
uses: peter-evans/create-pull-request@v5.0.1
with:
assignees: |
kevinmatthes
branch: feature/cargo-update
branch-suffix: timestamp
labels: |
enhancement
milestone: 4
title: '[GitHub Actions] cargo update'

################################################################################
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Added
.....

- GitHub Action workflow: ``cargo update`` on demand