env remove #3
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: CICD | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install packages | |
run: make install | |
- name: Set environment variables | |
run: | | |
echo "SERVER_HOSTNAME=${{ secrets.SERVER_HOSTNAME }}" >> $GITHUB_ENV | |
echo "ACCESS_TOKEN=${{ secrets.ACCESS_TOKEN }}" >> $GITHUB_ENV | |
- name: lint | |
run: make lint | |
- name: test | |
run: make test | |
- name: format | |
run: make format | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
# Build and push Docker image | |
- name: Build and push Docker image | |
run: | | |
docker build -t ${{ secrets.DOCKER_USERNAME }}/databricks-file-pipeline . | |
docker tag ${{ secrets.DOCKER_USERNAME }}/databricks-file-pipeline:latest ${{ secrets.DOCKER_USERNAME }}/databricks-file-pipeline:latest | |
docker push ${{ secrets.DOCKER_USERNAME }}/databricks-file-pipeline:latest |