Skip to content

Merge pull request #86 from sonatype-nexus-community/fix/deployment-e… #12

Merge pull request #86 from sonatype-nexus-community/fix/deployment-e…

Merge pull request #86 from sonatype-nexus-community/fix/deployment-e… #12

Workflow file for this run

name: Release
# This GitHub action runs on each tag created
on:
push:
tags:
- 'v*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
build:
name: Build and Publish Docker Image
env:
THIS_VERSION: $(echo "${{ github.ref_name }}" | cut -d 'v' -f2)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Set Yarn Version
run: yarn version --new-version ${{ env.THIS_VERSION }}
- name: Build and Publish
uses: docker/build-push-action@v5
with:
build-args: |
REACT_APP_COMPANY_NAME=${{ secrets.REACT_APP_COMPANY_NAME }}
REACT_APP_COMPANY_WEBSITE=${{ secrets.REACT_APP_COMPANY_WEBSITE }}
REACT_APP_CLA_APP_NAME=${{ secrets.REACT_APP_CLA_APP_NAME }}
REACT_APP_CLA_VERSION=${{ secrets.REACT_APP_CLA_VERSION }}
REACT_APP_GITHUB_CLIENT_ID=${{ secrets.REACT_APP_GITHUB_CLIENT_ID }}
context: .
file: ./Dockerfile
platforms: linux/amd64
push: true
tags: sonatypecommunity/the-cla:latest , sonatypecommunity/the-cla:${{ github.ref_name }}