Skip to content

Build images and push (on master branch or on schedule) #72

Build images and push (on master branch or on schedule)

Build images and push (on master branch or on schedule) #72

Workflow file for this run

name: Build images and push (on master branch or on schedule)
on:
push:
branches:
- master
schedule:
- cron: '0 0 1 * *'
workflow_dispatch:
jobs:
push:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- name: Run CI
run: |
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USER }} --password-stdin
echo "${{ secrets.CR_PAT }}" | docker login https://ghcr.io -u ${{ secrets.CR_USER }} --password-stdin
docker build -t ppiper/cf-cli:latest .
docker tag ppiper/cf-cli:latest ghcr.io/sap/ppiper-cf-cli:latest
docker push ppiper/cf-cli:latest
docker push ghcr.io/sap/ppiper-cf-cli:latest