Merge pull request #20 from Teamwork/master-push-to-ecr #1
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 | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to ECR | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ vars.AWS_ECR_MASTER_ACCOUNT }}.dkr.ecr.${{ vars.AWS_ECR_MASTER_REGION }}.amazonaws.com | |
username: ${{ secrets.AWS_ECR_MASTER_ACCESS_KEY }} | |
password: ${{ secrets.AWS_ECR_MASTER_SECRET_ACCESS_KEY }} | |
- name: build | |
run: | | |
make -f Makefile build push BRANCH=${{ github.ref_name }} NPM_TOKEN=${{ secrets.NPM_TOKEN }} ECR_ACCOUNT=${{ vars.AWS_ECR_MASTER_ACCOUNT }} ECR_REGION=${{ vars.AWS_ECR_MASTER_REGION }} | |
make -f Makefile git-prep git-push GH_TOKEN=${{ secrets.GH_ADMIN_TOKEN }} BRANCH=${{ github.ref_name }} |