Allow http method overriding in TraT call chain services #12
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: Version, Build, and Publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
packages: write | |
deployments: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install Dependencies | |
run: | | |
npm install -g semantic-release @semantic-release/changelog @semantic-release/git | |
npm list -g semantic-release | |
- name: Verify Installation | |
run: semantic-release --version | |
- name: Run Semantic Release | |
id: semantic | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
OUTPUT=$(npx semantic-release) | |
echo "Semantic Release Run Output:" | |
echo "$OUTPUT" | |
VERSION=$(echo "$OUTPUT" | grep -ioP '(?<=The next release version is )[0-9]+\.[0-9]+\.[0-9]+' || echo "") | |
if [ -n "$VERSION" ]; then | |
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV | |
echo "New version: $VERSION" | |
else | |
echo "No new version to release" | |
echo "RELEASE_VERSION=latest" >> $GITHUB_ENV | |
fi | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: service | |
file: ./service/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
ghcr.io/${{ github.repository }}:${{ env.RELEASE_VERSION }} | |
ghcr.io/${{ github.repository }}:latest | |
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Tconfigd - Central daemon for distributing and managing Tratteria configurations |