Skip to content

sed buildx to log in to harbor #5

sed buildx to log in to harbor

sed buildx to log in to harbor #5

Workflow file for this run

#name: Docker Image CI
#
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.
name: Publish Docker image
on:
push:
branches:
- 'main'
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Harbor
uses: docker/login-action@v2
with:
registry: https://${{ secrets.HARBOR_REGISTRY_URL }}
username: ${{ secrets.HARBOR_REGISTRY_USERNAME }}
password: ${{ secrets.HARBOR_REGISTRY_PASSWORD }}
# - name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
#on:
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
#
#jobs:
#
# build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Build the Docker image
# run: docker build -t harbor.crownlabs.polito.it/baeda/timeseries-inspector:$(date +%s).v1 .
#