-
Notifications
You must be signed in to change notification settings - Fork 5
57 lines (56 loc) · 1.79 KB
/
TagBot.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# SPDX-FileCopyrightText: 2023 Christian Willberg <christian.willberg@dlr.de>, Jan-Timo Hesse <jan-timo.hesse@dlr.de>
#
# SPDX-License-Identifier: BSD-3-Clause
name: TagBot
on:
issue_comment:
types:
- created
workflow_dispatch:
inputs:
lookback:
default: 3
permissions:
actions: read
checks: read
contents: write
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
DockerHub:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get version from Project.toml
id: get_version
run: echo "PERILAB_VERSION=$(awk -F'"' '/version/{print $2}' Project.toml)" >> $GITHUB_OUTPUT
- name: Build Docker image
run: docker build -t perihub/perilab:${{ steps.get_version.outputs.PERILAB_VERSION }} .
- name: Publish to Registry
run: docker push perihub/perilab:${{ steps.get_version.outputs.PERILAB_VERSION }}
- name: Retag latest
run: docker tag perihub/perilab:${{ steps.get_version.outputs.PERILAB_VERSION }} perihub/perilab:latest
- name: Publish to Registry
run: docker push perihub/perilab:latest