Fix euro/ECU boundary in legacy-currency rates (#523) #823
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: CI/CD Pipeline | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*" | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| env: | |
| APP_ENV: test | |
| OPENSSL_CONF: config/openssl_legacy.cnf | |
| TCMB_API_KEY: test | |
| FRED_API_KEY: test | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - run: bundle exec rake | |
| publish: | |
| needs: test | |
| if: ${{ github.event_name == 'push' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Extract Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: lineofflight/frankfurter | |
| tags: | | |
| type=ref,event=branch | |
| type=ref,event=tag | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| - name: Build and push | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| release: | |
| needs: test | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Extract version from tag | |
| id: extract_version | |
| run: | | |
| echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| echo "version_number=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Check if prerelease | |
| id: prerelease | |
| run: | | |
| VERSION="${GITHUB_REF#refs/tags/v}" | |
| if [[ "$VERSION" == *-* ]]; then | |
| echo "is_prerelease=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "is_prerelease=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Extract changelog entry | |
| id: changelog | |
| run: | | |
| VERSION_NUMBER="${{ steps.extract_version.outputs.version_number }}" | |
| awk "/^## \[$VERSION_NUMBER\]/{flag=1;next}/^## \[/{flag=0}flag" CHANGELOG.md > release_notes.md | |
| if [ -s release_notes.md ]; then | |
| echo "Found changelog entry for version $VERSION_NUMBER" | |
| else | |
| echo "No specific changelog entry found, using default" | |
| echo "Release ${{ steps.extract_version.outputs.version }}" > release_notes.md | |
| fi | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| tag_name: ${{ steps.extract_version.outputs.version }} | |
| name: ${{ steps.extract_version.outputs.version }} | |
| body_path: release_notes.md | |
| draft: false | |
| prerelease: ${{ steps.prerelease.outputs.is_prerelease == 'true' }} |