Skip to content

Update docker friendly (#78) #10

Update docker friendly (#78)

Update docker friendly (#78) #10

Workflow file for this run

# The Licensed Work is (c) 2022 Sygma
# SPDX-License-Identifier: LGPL-3.0-only
name: Spectre Testnet
on:
push:
branches:
- docker-friendly
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: Extract Version
run: echo "VERSION=${GITHUBREF#refs/tags/}" >> $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 }}/${{ github.repository }}:${{ env.TAG }},${{ env.REGISTRY }}/${{ github.repository }}:${{ env.VERSION }}
# - 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()