FOPTS-5121 Set default value to true for INCLUDE_PREVIOUS_MONTH (#54) #57
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: Build and Push Docker Image | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
issues: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Extract version from Chart.yaml | |
id: extract_version | |
run: | | |
VERSION=$(awk -F": " '/appVersion:/ {print $2}' ./helm-chart/Chart.yaml | tr -d '"') | |
echo "Extracted version: $VERSION" | |
echo "::set-output name=version::$VERSION" | |
shell: bash | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: arn:aws:iam::479353902725:role/gha-flexera-public-cbi-oi-kubecost-exporter-push | |
aws-region: us-east-1 | |
- name: Login to Amazon ECR | |
id: login-ecr | |
uses: aws-actions/amazon-ecr-login@v1 | |
with: | |
registry-type: public | |
registries: public.ecr.aws/flexera | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: | | |
public.ecr.aws/flexera/cbi-oi-kubecost-exporter:${{ steps.extract_version.outputs.version }} | |
public.ecr.aws/flexera/cbi-oi-kubecost-exporter:latest |