mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-23 07:09:35 +02:00
ci release
This commit is contained in:
parent
5c5c1acd44
commit
073d33e12f
3 changed files with 34 additions and 8 deletions
38
.github/workflows/build.yml
vendored
38
.github/workflows/build.yml
vendored
|
@ -2,20 +2,46 @@ name: Build NPM Package & Docker
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: [ "release" ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: ghcr.io
|
||||||
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: test
|
name: test
|
||||||
uses: './.github/workflows/test.yml'
|
uses: './.github/workflows/test.yml'
|
||||||
|
|
||||||
build-docker:
|
build-and-push-docker:
|
||||||
needs: [test]
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
attestations: write
|
||||||
|
id-token: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout repository
|
||||||
- name: Build the Docker image
|
uses: actions/checkout@v4
|
||||||
run: docker build . --file Dockerfile --tag db-vendo-client:6
|
- name: Log in to the Container registry
|
||||||
|
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
||||||
|
with:
|
||||||
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
- name: Build and push Docker image
|
||||||
|
id: push
|
||||||
|
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|
||||||
build-pkg:
|
build-pkg:
|
||||||
needs: [test]
|
needs: [test]
|
||||||
|
|
|
@ -4,7 +4,7 @@ LABEL org.opencontainers.image.description="A clean REST API wrapping around the
|
||||||
LABEL org.opencontainers.image.authors="Traines <git@traines.eu>"
|
LABEL org.opencontainers.image.authors="Traines <git@traines.eu>"
|
||||||
LABEL org.opencontainers.image.documentation="https://github.com/public-transport/db-vendo-client"
|
LABEL org.opencontainers.image.documentation="https://github.com/public-transport/db-vendo-client"
|
||||||
LABEL org.opencontainers.image.source="https://github.com/public-transport/db-vendo-client"
|
LABEL org.opencontainers.image.source="https://github.com/public-transport/db-vendo-client"
|
||||||
LABEL org.opencontainers.image.revision="6.0.0"
|
LABEL org.opencontainers.image.version="6.0.0"
|
||||||
LABEL org.opencontainers.image.licenses="ISC"
|
LABEL org.opencontainers.image.licenses="ISC"
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "db-vendo-client",
|
"name": "@public-transport/db-vendo-client",
|
||||||
"description": "Client for bahn.de public transport APIs.",
|
"description": "Client for bahn.de public transport APIs.",
|
||||||
"version": "6.0.0",
|
"version": "6.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|
Loading…
Add table
Reference in a new issue