-
Notifications
You must be signed in to change notification settings - Fork 85
64 lines (55 loc) · 1.87 KB
/
manual-promote.yaml
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
58
59
60
61
62
63
64
name: manual-promote
on: push
jobs:
release:
env:
TAG: '2.8.24'
SHA1: 3eb5752159d7e97e3b9135d38f4d94f1de2ae34a
ARTIFACT: 'github:scality:Zenko:staging-3eb5752159.build-iso-and-end2end-test.3397'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
ref: ${{ env.SHA1 }}
# - name: Fetch tags
# run: git fetch --tags
# - name: 'Check if tag matches the branch name'
# shell: bash
# run: >
# [[ "refs/heads/development/${{ env.TAG }}" == "${{ github.ref }}."* ]]
- name: 'Check if tag is set in VERSION file'
shell: bash
run: >
source VERSION
[[ "${{ env.TAG }}" == "$VERSION_FULL" ]]
- name: 'Check if tag was already created'
shell: bash
run: >
! git show-ref --tags ${{ env.TAG }} --quiet
- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release ${{ env.TAG }}
tag_name: ${{ env.TAG }}
generate_release_notes: true
target_commitish: ${{ env.SHA1 }}
#- name: Promote artifacts
# uses: scality/action-artifacts@v4
# with:
# method: promote
# url: https://artifacts.scality.net
# name: ${{ env.ARTIFACT }}
# tag: ${{ env.TAG }}
# user: ${{ secrets.ARTIFACTS_USER }}
# password: ${{ secrets.ARTIFACTS_PASSWORD }}
- name: Promote artifacts
shell: bash
run: |
PROMOTED="${{ env.ARTIFACT }}"
curl -u "${{ secrets.ARTIFACTS_USER }}:${{ secrets.ARTIFACTS_PASSWORD }}" \
-X GET https://artifacts.scality.net/copy/${{ env.ARTIFACT }}/${PROMOTED//staging*}promoted-${{ env.TAG }}/