v0.2.2 #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
# This GitHub action runs on each tag created | |
on: | |
push: | |
tags: | |
- 'v*' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
LC_APPLICATION_ID: the-cla | |
permissions: | |
contents: write | |
jobs: | |
release: | |
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: Build Container and export to Docker | |
uses: docker/build-push-action@v6 | |
with: | |
build-args: | | |
REACT_APP_CLA_URL=${{ secrets.CLA_URL }} | |
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 | |
load: true | |
platforms: linux/amd64 | |
tags: sonatypecommunity/the-cla:latest , sonatypecommunity/the-cla:${{ github.ref_name }} | |
- name: Sonatype Lifecycle Evaluation | |
id: evaluate | |
uses: sonatype/actions/[email protected] | |
with: | |
iq-server-url: ${{ vars.SONATYPE_PLATFORM_URL }} | |
username: ${{ secrets.SONATYPE_LIFECYCLE_USERNAME }} | |
password: ${{ secrets.SONATYPE_LIFECYCLE_PASSWORD }} | |
application-id: ${{ env.LC_APPLICATION_ID }} | |
scan-targets: 'container:docker.io/sonatypecommunity/the-cla:${{ github.ref_name }} .' | |
stage: release | |
- name: Build and Publish | |
uses: docker/build-push-action@v5 | |
with: | |
build-args: | | |
REACT_APP_CLA_URL=${{ secrets.CLA_URL }} | |
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 }} |