diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 41cf2ba..9675c77 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,13 +2,20 @@ env: db_name: ${{vars.DB_NAME}} name: build dietly-ui -run-name: ${{ github.actor }} is build dietly-ui +run-name: ${{ github.actor }} is building dietly-ui on: [push] jobs: - scrap-dietly: + build-and-push: runs-on: ubuntu-latest environment: dev steps: - name: Check out repository code uses: actions/checkout@v4 - - run: docker build -t dietly:0.3 . \ No newline at end of file + - run: docker build -t europe-central2-docker.pkg.dev/gcp101713-michalpiasecki/dietly/ui:${{ github.sha }} . + - run: curl https://sdk.cloud.google.com | bash -s -- --disable-prompts + - run: echo "${{secrets.GOOGLE_APPLICATION_CREDENTIALS}}" | base64 -d > key.json + - run: gcloud auth activate-service-account --key-file key.json + - run: gcloud auth list + - run: gcloud auth configure-docker europe-central2-docker.pkg.dev + - run: docker push europe-central2-docker.pkg.dev/gcp101713-michalpiasecki/dietly/ui:${{ github.sha }} +