Skip to content

tag-release

tag-release #6

Workflow file for this run

name: tag-release
on:
push:
tags:
- "v*.*.*"
jobs:
tagged-release:
name: Tagged Release
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata for the Docker image
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/1kx-network/ipfs-pinner
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Login to Artifact Registry/GCR
# uses: docker/login-action@v2
# with:
# registry: us-docker.pkg.dev
# username: _json_key
# password: ${{ secrets.GCR_JSON_KEY }}
# - name: Set env
# run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
#
# - name: Build & Publish the Docker image
# run: |
# docker buildx create --name builder --use --platform=linux/amd64,linux/arm64 && docker buildx build --platform=linux/amd64,linux/arm64 . -t us-docker.pkg.dev/covalent-project/network/ipfs-pinner:stable -t us-docker.pkg.dev/covalent-project/network/ipfs-pinner:"${{ env.TAG }}" --push
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
- uses: "marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0" # v1.2.1
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
draft: false
prerelease: false