Build images and push (on master branch or on schedule) #25
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: 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 | |
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/neo-cli:latest . | |
docker tag ppiper/neo-cli:latest ghcr.io/sap/ppiper-neo-cli:latest | |
docker push ppiper/neo-cli:latest | |
docker push ghcr.io/sap/ppiper-neo-cli:latest |