-
Notifications
You must be signed in to change notification settings - Fork 12
58 lines (47 loc) · 1.42 KB
/
spectre-test.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
58
# The Licensed Work is (c) 2022 Sygma
# SPDX-License-Identifier: LGPL-3.0-only
name: Spectre Testnet
on:
push:
tags:
- 'v*.*.*'
env:
REGISTRY: 'ghcr.io'
TAG: 'latest'
jobs:
push:
name: push
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: checkout the source code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: login to ghcr
id: ghcr
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Repository name conversion
run: |
echo "REPO_NAME=${GITHUB_REPOSITORY@L}" >> $GITHUB_ENV
- name: build / tag / push docker image into ghcr
id: build-and-push-tag
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ env.REPO_NAME }}:${{ env.TAG }},${{ env.REGISTRY }}/${{ env.REPO_NAME }}:${{ github.ref_name }}
# - name: slack notify
# uses: 8398a7/action-slack@v3
# with:
# status: ${{ job.status }}
# fields: repo,message,commit,author,action,job,eventName,ref,workflow
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# if: always()