docker-BioJulia/.github/workflows/update.yml

45 lines
1.6 KiB
YAML
Raw Normal View History

name: Update Packages
on:
schedule:
- cron: "0 0 2,16 * *"
workflow_dispatch:
jobs:
pkg_up:
name: Update Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: "1.6"
- id: julia_ver
run: |
echo "::set-output name=version::$(julia -v | awk '{print $3}')"
- run: |
julia --project=${GITHUB_WORKSPACE} -e '
using Pkg
Pkg.instantiate()
Pkg.update()'
- id: biosequences_ver
run: |
echo "::set-output name=version::$(julia --project=${GITHUB_WORKSPACE} -e 'using Pkg, UUIDs; println(string(Pkg.dependencies()[UUID("7e6ae17a-c86d-528c-b3b9-7f778a29fe59")].version))')"
- id: time
uses: nanzm/get-time-action@v1.1
with:
format: "YYYY-MM-DD"
- uses: devops-infra/action-commit-push@v0.9.0
with:
github_token: ${{ secrets.GH_PAK }}
commit_message: "[⚡ AUTOMATED]: Pkg upgrade for ${{ steps.time.outputs.time }}"
- id: hash
run: |
echo "::set-output name=short_hash::$(git rev-parse --short HEAD)"
echo "::set-output name=long_hash::$(git rev-parse HEAD)"
- uses: mathieudutour/github-tag-action@v6.0
with:
github_token: ${{ secrets.GH_PAK }}
commit_sha: ${{ steps.hash.outputs.long_hash }}
tag_prefix: ""
custom_tag: ${{ steps.julia_ver.outputs.version }}-${{ steps.biosequences_ver.outputs.version }}-${{ steps.hash.outputs.short_hash }}