chore: Update version for release (beta) (#1023) #37
Workflow file for this run
This file contains hidden or 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: "🚢 Publish Infra Images" | |
on: | |
push: | |
tags: | |
- "infra-dev-*" | |
- "infra-test-*" | |
- "infra-prod-*" | |
paths: | |
- ".github/workflows/publish.yml" | |
- "packages/**" | |
- "!packages/**/*.md" | |
- "!packages/**/*.eslintrc" | |
- "apps/**" | |
- "!apps/**/*.md" | |
- "!apps/**/*.eslintrc" | |
- "integrations/**" | |
- "!integrations/**/*.md" | |
- "!integrations/**/*.eslintrc" | |
- "pnpm-lock.yaml" | |
- "pnpm-workspace.yaml" | |
- "turbo.json" | |
- "docker/Dockerfile" | |
- "docker/scripts/**" | |
- "tests/**" | |
permissions: | |
id-token: write | |
packages: write | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
env: | |
AWS_REGION: us-east-1 | |
jobs: | |
build: | |
strategy: | |
matrix: | |
package: [coordinator, kubernetes-provider] | |
runs-on: buildjet-16vcpu-ubuntu-2204 | |
env: | |
DOCKER_BUILDKIT: "1" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate image reference | |
id: prep | |
# WARNING: This step expects the workflow to have been triggered by a specific tag format of: infra-${env}-* | |
run: | | |
env=$(echo ${{ github.ref_name }} | cut -d- -f2) | |
sha=${GITHUB_SHA::7} | |
ts=$(date +%s) | |
if [[ "${{ matrix.package }}" == *-provider ]]; then | |
provider_type=$(echo ${{ matrix.package }} | cut -d- -f1) | |
repository=provider/${provider_type} | |
else | |
repository=${{ matrix.package }} | |
fi | |
echo "IMAGE_TAG=${env}-${sha}-${ts}" >> "$GITHUB_OUTPUT" | |
echo "REPOSITORY=${repository}" >> "$GITHUB_OUTPUT" | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
# ..to avoid rate limits when pulling images | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: 🚢 Build Container Image | |
run: | | |
docker build -t infra_image -f ./apps/${{ matrix.package }}/Containerfile . | |
# ..to push image | |
- name: 🐙 Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: 🐙 Push to GitHub Container Registry | |
run: | | |
docker tag infra_image $REGISTRY/$REPOSITORY:$IMAGE_TAG | |
docker push $REGISTRY/$REPOSITORY:$IMAGE_TAG | |
env: | |
REGISTRY: ghcr.io/triggerdotdev | |
REPOSITORY: ${{ steps.prep.outputs.REPOSITORY }} | |
IMAGE_TAG: ${{ steps.prep.outputs.IMAGE_TAG }} |