Skip to content

Update prebuilt_devcontainer.yml #11

Update prebuilt_devcontainer.yml

Update prebuilt_devcontainer.yml #11

# SPDX-FileCopyrightText: 2023 SUSE LLC
#
# SPDX-License-Identifier: Apache-2.0
name: 'pre-built devcontainer'
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-devcontainer
jobs:
devcontainer-build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Compute tag for devcontainer image
id: meta
run: |
tag=$(git rev-parse --short HEAD)
echo "tag=$tag" >> "$GITHUB_OUTPUT"
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for the container image
id: meta

Check failure on line 40 in .github/workflows/prebuilt_devcontainer.yml

View workflow run for this annotation

GitHub Actions / pre-built devcontainer

Invalid workflow file

The workflow is not valid. .github/workflows/prebuilt_devcontainer.yml (Line: 40, Col: 13): The identifier 'meta' may not be used more than once within the same scope.
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push contaimer image
uses: docker/build-push-action@v6
with:
context: ./image/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}