Skip to content

Add support for proxy servers (#676) #151

Add support for proxy servers (#676)

Add support for proxy servers (#676) #151

Workflow file for this run

name: Release
on:
push:
tags:
- "*.*.*"
permissions:
contents: write
jobs:
releaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Extract tag name
run: |
# remove the "refs/tags/" prefix to get the tag that was pushed
export RAW_TAG=${GITHUB_REF#refs/tags/}
# add a 'v' prefix to the tag if it doesn't already have one
export V_TAG=$(echo "$RAW_TAG" | sed 's/^[^v]/v&/')
# store the tag name in a github environment variable for later steps
echo "TAG_NAME=${V_TAG}" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Registry
uses: docker/login-action@v2
with:
registry: registry.replicated.com
username: ${{ secrets.REGISTRY_USERNAME_PRODUCTION }}
password: ${{ secrets.REGISTRY_PASSWORD_PRODUCTION }}
- name: Build and push local-artifact-mirror image (production)
run: |
make build-and-push-local-artifact-mirror-image VERSION=$TAG_NAME
- name: Login to Registry
uses: docker/login-action@v2
with:
registry: registry.staging.replicated.com
username: ${{ secrets.REGISTRY_USERNAME_STAGING }}
password: ${{ secrets.REGISTRY_PASSWORD_STAGING }}
- name: Build and push local-artifact-mirror image (staging)
run: |
export LOCAL_ARTIFACT_MIRROR_IMAGE=registry.staging.replicated.com/library/embedded-cluster-local-artifact-mirror
make build-and-push-local-artifact-mirror-image VERSION=$TAG_NAME
- name: Build linux-amd64
run: |
make embedded-cluster-linux-amd64 VERSION=$TAG_NAME
tar -C output/bin -czvf embedded-cluster-linux-amd64.tgz embedded-cluster
- name: Output Metadata
run: |
./output/bin/embedded-cluster version metadata > metadata.json
- name: Cache Staging Files
env:
S3_BUCKET: "tf-staging-embedded-cluster-bin"
AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_EMBEDDED_CLUSTER_UPLOAD_IAM_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_EMBEDDED_CLUSTER_UPLOAD_IAM_SECRET }}
AWS_REGION: "us-east-1"
run: |
export EC_VERSION="$TAG_NAME"
./scripts/cache-files.sh
- name: Cache Prod Files
env:
S3_BUCKET: "tf-embedded-cluster-binaries"
AWS_ACCESS_KEY_ID: ${{ secrets.PROD_EMBEDDED_CLUSTER_UPLOAD_IAM_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.PROD_EMBEDDED_CLUSTER_UPLOAD_IAM_SECRET }}
AWS_REGION: "us-east-1"
run: |
export EC_VERSION="$TAG_NAME"
./scripts/cache-files.sh
- name: Publish release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
files: |
*.tgz
metadata.json