This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
Give warning is using dbc2val from this repo #190
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: kuksa_gps_feeder | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
paths: | |
- ".github/workflows/kuksa_gps_feeder.yml" | |
- ".github/actions/post-container-location/action.yml" | |
- "gps2val/**" | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
env: | |
EPHEMERAL_IMAGE: "ttl.sh/kuksa.val.feeders/gps-${{ github.sha }}" | |
jobs: | |
check_ghcr_push: | |
uses: eclipse-kuksa/kuksa-actions/.github/workflows/check_ghcr_push.yml@2 | |
secrets: inherit | |
build-gps-feeder: | |
name: "Build GPS feeder" | |
runs-on: ubuntu-latest | |
needs: check_ghcr_push | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
# list of Docker images to use as base name for tags | |
images: ghcr.io/${{ github.repository }}/gps | |
# generate Docker tags based on the following events/attributes | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
- name: Log in to the Container registry | |
if: needs.check_ghcr_push.outputs.push == 'true' | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push KUKSA gps feeder container image and push to ghcr.io and ttl.sh | |
if: needs.check_ghcr_push.outputs.push == 'true' | |
uses: docker/build-push-action@v4 | |
with: | |
platforms: | | |
linux/amd64 | |
linux/arm64 | |
context: gps2val | |
push: true | |
tags: | | |
${{ steps.meta.outputs.tags }} | |
${{ env.EPHEMERAL_IMAGE }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Build ephemeral KUKSA gps feeder and push to ttl.sh | |
if: needs.check_ghcr_push.outputs.push == 'false' | |
uses: docker/build-push-action@v4 | |
with: | |
platforms: | | |
linux/amd64 | |
linux/arm64 | |
context: gps2val | |
push: true | |
tags: ${{ env.EPHEMERAL_IMAGE }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Posting ghcr.io Summary | |
if: needs.check_ghcr_push.outputs.push == 'true' | |
uses: ./.github/actions/post-container-location | |
with: | |
image: ${{ steps.meta.outputs.tags }} | |
docker-run-args: "-it --rm" | |
- name: Posting ttl.sh Summary | |
uses: ./.github/actions/post-container-location | |
with: | |
image: ${{ env.EPHEMERAL_IMAGE }} | |
docker-run-args: "-it --rm" |