Add .whitesource configuration file #32
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: Tag on merge | ||
on: | ||
push: | ||
branches: | ||
- main | ||
env: | ||
REGISTRY: "us-docker.pkg.dev" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ vars.REGISTRY_USERNAME }} | ||
password: ${{ secrets.REGISTRY_TOKEN }} | ||
- name: Set tag | ||
id: set_tag | ||
#run: echo "BUILD_TAG=$(date +%Y%m%d)" >> $GITHUB_OUTPUT | ||
run: echo "BUILD_TAG=$(date +%Y%m%d%H%M)" >> $GITHUB_ENV | ||
- name: Build | ||
id: bake | ||
uses: docker/bake-action@v5 | ||
with: | ||
source: "{{defaultContext}}:docker" | ||
push: true | ||
files: | | ||
./docker-bake.hcl | ||
#set: | | ||
# default.TAG=${{ steps.set_tag.outputs.PR_TAG }} | ||
- name: Install Helm | ||
uses: azure/setup-helm@v4 | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Update chart version | ||
id: update_chart_version | ||
run: sed -ie "s/^version:.*/version: $BUILD_TAG/" charts/identity-platform/Chart.yaml | ||
- name: Update chart app version | ||
id: update_chart_app_version | ||
run: sed -ie "s/^appVersion:.*/appVersion: $BUILD_TAG/" charts/identity-platform/Chart.yaml | ||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
with: | ||
charts_dir: charts | ||
pages_branch: gh-pages | ||
- name: Create tag | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
#custom_tag: ${{ steps.set_tag.outputs.PR_TAG }} | ||
custom_tag: ${{ env.BUILD_TAG }} | ||