2021-08-24 11:03:09 +00:00
|
|
|
name: Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- "v*"
|
|
|
|
|
2023-04-15 12:54:44 +00:00
|
|
|
env:
|
|
|
|
REGISTRY_NAME: cr.yandex/crp9ftr22d26age3hulg
|
|
|
|
REGISTRY_NAME2: cr.il.nebius.cloud/crll7us9n6i5j3v4n92m
|
|
|
|
IMAGE_NAME: csi-s3
|
|
|
|
IMAGE_NAME2: yandex-cloud/csi-s3/csi-s3-driver
|
|
|
|
|
2021-08-24 11:03:09 +00:00
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-04-15 12:54:44 +00:00
|
|
|
- name: Set IMAGE_TAG env
|
|
|
|
# GITHUB_REF value: refs/heads/v*
|
|
|
|
run: echo "VERSION=$(echo ${GITHUB_REF:11})" >> $GITHUB_ENV
|
|
|
|
|
2023-04-15 12:58:39 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-08-24 11:03:09 +00:00
|
|
|
|
2023-04-15 12:54:44 +00:00
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
with:
|
|
|
|
platforms: all
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Show available platforms
|
|
|
|
run: echo ${{ steps.buildx.outputs.platforms }}
|
|
|
|
|
|
|
|
- name: Login to Registry
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: cr.yandex
|
|
|
|
username: json_key
|
|
|
|
password: ${{ secrets.REGISTRY_KEY }}
|
|
|
|
|
|
|
|
- name: Build and push
|
|
|
|
uses: docker/build-push-action@v4
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
2023-04-15 12:55:33 +00:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2023-04-15 12:54:44 +00:00
|
|
|
tags: |
|
|
|
|
${{ env.REGISTRY_NAME }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
|
|
|
|
${{ env.REGISTRY_NAME }}/${{ env.IMAGE_NAME }}:latest
|
|
|
|
${{ env.REGISTRY_NAME }}/${{ env.IMAGE_NAME2 }}:${{ env.VERSION }}
|
|
|
|
${{ env.REGISTRY_NAME }}/${{ env.IMAGE_NAME2 }}:latest
|
2021-08-24 11:03:09 +00:00
|
|
|
|
|
|
|
- uses: "marvinpinto/action-automatic-releases@latest"
|
|
|
|
with:
|
|
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
|
|
prerelease: false
|