steps:
  # Print the working directory contents for debugging
  - name: 'ubuntu'
    args: ['ls', '-la']
    
  # Build the container
  - name: 'gcr.io/cloud-builders/docker'
    args:
      - 'build'
      - '-t'
      - 'us-central1-docker.pkg.dev/$PROJECT_ID/backup-scripts/backup-script:latest'
      - '.'
  
  # Push to Artifact Registry
  - name: 'gcr.io/cloud-builders/docker'
    args:
      - 'push'
      - 'us-central1-docker.pkg.dev/$PROJECT_ID/backup-scripts/backup-script:latest'

images:
  - 'us-central1-docker.pkg.dev/$PROJECT_ID/backup-scripts/backup-script:latest'