Update prebuilt_devcontainer.yml #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 GitHub Actions / pre-built devcontainerInvalid workflow file
|
||
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 }} |