Skip to content

card pairing

card pairing #24

Workflow file for this run

name: Docker Image CI
on:
push:
branches:
- main
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: install node packages
run: echo "disabled:" npm ci
- name: Extract version number
run: echo VERSION=$( node -e 'console.log(require("./package.json").version)' ) >> $GITHUB_ENV
- name: Test version number and branch name
run: echo version ${{ env.VERSION }} ref_name ${{ github.ref_name }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: harbor.cs.dm.unipi.it/dm-coffee/dm-coffee
tags: |
type=raw,value=latest
type=ref,event=tag
type=ref,event=branch
type=semver,pattern={{version}}
- name: Login to docker Harbor
uses: docker/login-action@v3
with:
username: ${{ vars.HARBOR_ROBOT_USERNAME }}
password: ${{ secrets.HARBOR_ROBOT_SECRET }}
registry: harbor.cs.dm.unipi.it
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
if: ${{ github.event_name != 'pull_request' }}
with:
push: true
context: .
tags: harbor.cs.dm.unipi.it/dm-coffee/dm-coffee:latest , harbor.cs.dm.unipi.it/dm-coffee/dm-coffee:${{ github.ref_name }} , harbor.cs.dm.unipi.it/dm-coffee/dm-coffee:${{ github.ref_name }}_${{ env.VERSION }}
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}