Skip to content

fix: on/off 5s (#142) #100

fix: on/off 5s (#142)

fix: on/off 5s (#142) #100

name: Run Release Please
on:
push:
branches:
- main
permissions:
contents: read
env:
REGISTRY: ghcr.io
FLAGD_IMAGE_NAME: flagd-testbed
SYNC_IMAGE_NAME: sync-testbed
GO_VERSION: "~1.21"
jobs:
release-please:
permissions:
contents: write # for google-github-actions/release-please-action to create release commit
pull-requests: write # for google-github-actions/release-please-action to create release PR
runs-on: ubuntu-latest
# Release-please creates a PR that tracks all changes
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main
outputs:
release_created: ${{ steps.release.outputs.release_created }}
release_tag_name: ${{ steps.release.outputs.tag_name }}
build-push:
needs: release-please
name: build and push image to the github registery
permissions:
packages: write
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.release-please.outputs.release_tag_name }}
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push flagd-testbed Docker image
uses: docker/build-push-action@v6
with:
context: .
file: flagd/Dockerfile
push: true
tags: |
${{ env.REGISTRY }}/open-feature/${{ env.FLAGD_IMAGE_NAME }}:${{ needs.release-please.outputs.release_tag_name }}
${{ env.REGISTRY }}/open-feature/${{ env.FLAGD_IMAGE_NAME }}:latest
- name: Build and push flagd-testbed-unstable Docker image
uses: docker/build-push-action@v6
with:
context: .
file: flagd/Dockerfile.unstable
push: true
tags: |
${{ env.REGISTRY }}/open-feature/${{ env.FLAGD_IMAGE_NAME }}-unstable:${{ needs.release-please.outputs.release_tag_name }}
${{ env.REGISTRY }}/open-feature/${{ env.FLAGD_IMAGE_NAME }}-unstable:latest
- name: Build and push sync-testbed Docker image
uses: docker/build-push-action@v6
with:
context: .
file: sync/Dockerfile
push: true
tags: |
${{ env.REGISTRY }}/open-feature/${{ env.SYNC_IMAGE_NAME }}:${{ needs.release-please.outputs.release_tag_name }}
${{ env.REGISTRY }}/open-feature/${{ env.SYNC_IMAGE_NAME }}:latest
- name: Build and push sync-testbed-unstable Docker image
uses: docker/build-push-action@v6
with:
context: .
file: sync/Dockerfile.unstable
push: true
tags: |
${{ env.REGISTRY }}/open-feature/${{ env.SYNC_IMAGE_NAME }}-unstable:${{ needs.release-please.outputs.release_tag_name }}
${{ env.REGISTRY }}/open-feature/${{ env.SYNC_IMAGE_NAME }}-unstable:latest