Merge pull request #26 from ForgeRock/dev #8
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: 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: Run chart-releaser | |
uses: helm/[email protected] | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- 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 }} | |