diff --git a/example/build.yml b/example/build.yml index a7b79d5..cb87989 100644 --- a/example/build.yml +++ b/example/build.yml @@ -4,7 +4,7 @@ jobs: build-and-push-to-gcr: runs-on: ubuntu-latest steps: - - uses: RafikFarhad/push-to-gcr-github-action@v1 + - uses: RafikFarhad/push-to-gcr-github-action@v2 with: gcloud_service_key: ${{ secrets.GCLOUD_SERVICE_KEY }} registry: gcr.io diff --git a/example/build_all_option.yml b/example/build_all_option.yml new file mode 100644 index 0000000..a8ed38a --- /dev/null +++ b/example/build_all_option.yml @@ -0,0 +1,16 @@ +name: Push to GCR Github Action +on: [push] +jobs: + build-and-push-to-gcr: + runs-on: ubuntu-latest + steps: + - uses: RafikFarhad/push-to-gcr-github-action@v2 + with: + gcloud_service_key: ${{ secrets.GCLOUD_SERVICE_KEY }} + registry: gcr.io + project_name: my-awesome-project + image_name: server-end + image_tag: latest,v1 + dockerfile: ./docker/Dockerfile.prod + target: prod + context: ./docker diff --git a/example/build_only_tags.yml b/example/build_only_tags.yml index 7225300..31f3d6c 100644 --- a/example/build_only_tags.yml +++ b/example/build_only_tags.yml @@ -10,11 +10,11 @@ jobs: - name: Get the tag name id: get_tag_name run: echo ::set-output name=GIT_TAG_NAME::${GITHUB_REF/refs\/tags\//} - - uses: RafikFarhad/push-to-gcr-github-action@v1 + - uses: RafikFarhad/push-to-gcr-github-action@v2 with: gcloud_service_key: ${{ secrets.GCLOUD_SERVICE_KEY }} registry: gcr.io project_name: my-awesome-project image_name: server-end - image_tag: ${{ steps.get_tag_name.outputs.GIT_TAG_NAME }} + image_tag: latest,${{ steps.get_tag_name.outputs.GIT_TAG_NAME }} dockerfile: ./build/Dockerfile \ No newline at end of file