fixup: add start command, docker stuff #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: 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.19.3 | ||
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@v3 | ||
with: | ||
ref: ${{ needs.release-please.outputs.release_tag_name }} | ||
- name: Build sync binary | ||
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- run: make build-sync | ||
- name: Log in to the Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push flagd-testbed Docker image | ||
uses: docker/build-push-action@v4 | ||
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 sync-testbed Docker image | ||
uses: docker/build-push-action@v4 | ||
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 |