Skip to content

github actions cannot use both uses and run, removing the uses #2

github actions cannot use both uses and run, removing the uses

github actions cannot use both uses and run, removing the uses #2

name: Push to GCR/GHCR GitHub Action
on: push
jobs:
build-and-push-to-gcr-service-account:
name: Build & push to GCR/GHCR
if: startsWith(github.ref, 'refs/tags/') # only publish to registry on tag pushes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.B64_GCLOUD_SERVICE_ACCOUNT_JSON }}'
- name: Building and pushing the image
run: |
docker login ghcr.io -u abaumann -p ${github_token}
./docker/vm_boot_images/build.sh -P
./docker/vm_boot_images/build.sh -c -P
with:

Check failure on line 21 in .github/workflows/publish-to-gcr-ghcr.yml

View workflow run for this annotation

GitHub Actions / Push to GCR/GHCR GitHub Action

Invalid workflow file

The workflow is not valid. .github/workflows/publish-to-gcr-ghcr.yml (Line: 21, Col: 9): Unexpected value 'with'
github_token: ${{ secrets.GHCR_TOKEN }}