Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 35 additions & 8 deletions .github/workflows/lambda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
packages: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand All @@ -39,10 +37,39 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
logout: true
- name: Build image
run: |
docker build -t ${{ vars.LAMBDA_IMAGE_REPOSITORY }}:${{ vars.LAMBDA_IMAGE_TAG }} .
working-directory: ./lambda
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: ./lambda
tags: "${{ vars.LAMBDA_IMAGE_REPOSITORY }}:${{ vars.LAMBDA_IMAGE_TAG }}"
push: false
cache-from: type=gha
cache-to: type=gha,mode=max
push:
runs-on: ubuntu-latest
environment: AWS-python-lambda
needs: build
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- name: Login to GHCR
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
logout: true
- name: Push image
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
run: |
docker push ${{ vars.LAMBDA_IMAGE_REPOSITORY }}:${{ vars.LAMBDA_IMAGE_TAG }}
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: ./lambda
tags: "${{ vars.LAMBDA_IMAGE_REPOSITORY }}:${{ vars.LAMBDA_IMAGE_TAG }}"
push: true
cache-from: type=gha
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Tsingis_cars-data&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Tsingis_cars-data) [![Lambda Status](https://github.com/tsingis/cars-data/actions/workflows/lambda.yml/badge.svg)](https://github.com/tsingis/cars-data/actions/workflows/lambda.yml) [![Docker Scout](https://github.com/tsingis/cars-data/actions/workflows/scout.yml/badge.svg)](https://github.com/tsingis/cars-data/actions/workflows/scout.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Tsingis_cars-data&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Tsingis_cars-data) [![Docker Scout](https://github.com/tsingis/cars-data/actions/workflows/scout.yml/badge.svg)](https://github.com/tsingis/cars-data/actions/workflows/scout.yml)

Project about passenger cars in Finland. Open source data from [Traficom](https://tieto.traficom.fi/en/datatraficom/open-data)

Expand Down