git - Github 操作失败
问题描述
Github Actions 直到昨天还在我的存储库中工作。我没有在 .github/workflows/dev.yml 文件或 DockerFile 中进行任何更改。
但是,突然在最近的推送中,我的 Github Actions 因错误而失败
设置、构建、发布和部署
Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/home/runner/work/_actions/GoogleCloudPlatform/github-actions/master/setup-gcloud'. Did you forget to run actions/checkout before running your local action?
我可以知道如何解决这个问题吗
这是我正在使用的示例 .yml 文件。
name: Release to Development
on:
push:
branches:
- 'master'
jobs:
setup-build-publish-deploy:
name: Setup, Build, Publish, and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
# Setup gcloud CLI
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '270.0.0'
service_account_email: ${{ secrets.GCLOUD_EMAIL_DEV }}
service_account_key: ${{ secrets.GCLOUD_AUTH_DEV }}
# Configure docker to use the gcloud command-line tool as a credential helper
- run: |
# Set up docker to authenticate
# via gcloud command-line tool.
gcloud auth configure-docker
# Build the Docker image
- name: Build
run: |
docker build -t "$REGISTRY_HOSTNAME"/"$GKE_PROJECT"/"$IMAGE":"$GITHUB_SHA" \
--build-arg GITHUB_SHA="$GITHUB_SHA" \
--build-arg GITHUB_REF="$GITHUB_REF" .
# Push the Docker image to Google Container Registry
- name: Publish
run: |
docker push $REGISTRY_HOSTNAME/$GKE_PROJECT/$IMAGE:$GITHUB_SHA
# Set up kustomize
- name: Set up Kustomize
run: |
curl -o kustomize --location https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64
chmod u+x ./kustomize
# Deploy the Docker image to the GKE cluster
- name: Deploy
run: |
解决方案
uses
我通过将值更改为来修复它
uses: google-github-actions/setup-gcloud@master
推荐阅读
- asp.net - .NET Core URL 重写,用于从 Web 表单迁移到 .NET Core
- php - 自定义运输方式插件中的 WooCommerce 运输成本计算
- php - 如何在 Laravel 资源中为 parent::toArray 添加键
- mysql - Mysql 查询编号分组行
- android - Android 谷歌地图崩溃:com.google.android.gms.dynamite_mapsdynamite Firebase
- php - WooCommerce - 在迷你购物车中显示自定义价格
- c# - solace - 故障转移连接
- python-3.x - 我如何使用 python 从 flashscore 中抓取足球结果
- node.js - Node Js大文件上传(多用户)
- ios - WKNavigationDelegate 中的行为不一致