name: ci on: schedule: - cron: "0 10 * * *" push: branches: - "**" tags: - "v*.*.*" pull_request: branches: - "main" jobs: docker: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4.1.7 - name: Docker meta id: meta uses: docker/metadata-action@v5.5.1 with: # list of Docker images to use as base name for tags images: | harbor.evanshome.io/library/py-eagle-mqtt # generate Docker tags based on the following events/attributes tags: | type=schedule type=ref,event=branch type=ref,event=pr type=semver,pattern={{raw}} type=semver,pattern={{version}} type=sha - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3.6.1 - name: Login to Harbor if: github.event_name != 'pull_request' uses: docker/login-action@v3.3.0 with: registry: harbor.evanshome.io username: ${{ secrets.HARBOR_USERNAME }} password: ${{ secrets.HARBOR_PASSWORD }} - name: echo new tag run: | echo "${{ steps.meta.outputs.tags }}" # - name: Build and push # uses: docker/build-push-action@v6.2.0 # with: # context: ./Docker/ # push: ${{ github.event_name != 'pull_request' }} # tags: ${{ steps.meta.outputs.tags }} # labels: ${{ steps.meta.outputs.labels }}