This repository has been archived by the owner on May 12, 2024. It is now read-only.
config.yml: update snyk orb and cci images #32
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' | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- 'main' | |
env: | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
REPOSITORY_NAME: ${{ secrets.REPOSITORY_NAME}} | |
jobs: | |
create-github-release: | |
runs-on: ubuntu-latest | |
outputs: | |
output1: ${{ steps.release.outputs.version }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- id: release | |
uses: rymndhng/[email protected] | |
with: | |
bump_version_scheme: minor | |
use_github_release_notes: true | |
tag_prefix: "v" | |
release_name: "<RELEASE_VERSION>" | |
- name: Check Output Parameters | |
id: release_parameters | |
run: | | |
echo "Got tag name ${{ steps.release.outputs.tag_name }}" | |
echo "Got release version ${{ steps.release.outputs.version }}" | |
echo "RELEASE_NUMBER=${{ steps.release.outputs.version }}" >> $GITHUB_OUTPUT | |
build_and_push_to_registry: | |
name: Build and push Docker image to Docker Hub | |
if: github.event.label.name == 'release:minor' || github.event.label.name == 'release:major' || github.event.label.name == 'release:patch' | |
runs-on: ubuntu-latest | |
needs: create-github-release | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push docker image for amd64 and amd64 | |
run: | | |
docker buildx build --push \ | |
--tag $DOCKERHUB_USERNAME/$REPOSITORY_NAME:"${{ needs.create-github-release.outputs.output1 }}" \ | |
--platform amd64,arm64 . |