Workflow file for this run
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: Base sdf-action Docker Image (DBT based) | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'Dockerfile.base' | |
pull_request: | |
paths: | |
- 'Dockerfile.base' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
- name: Set up QEMU | |
uses: docker/[email protected] | |
- name: Build Docker image | |
if: github.event_name == 'pull_request' | |
run: | | |
docker buildx build \ | |
--file Dockerfile.base \ | |
--platform linux/amd64,linux/arm64 \ | |
--tag ghcr.io/${{ github.repository }}-dbt-base:latest . | |
- name: Build and Push Docker image on main branch | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
run: | | |
docker buildx build \ | |
--file Dockerfile.base \ | |
--platform linux/amd64,linux/arm64 \ | |
--push \ | |
--tag ghcr.io/${{ github.repository }}-dbt-base:latest . |