Skip to content

Improve documentation and fix some version URI error (#21) #16

Improve documentation and fix some version URI error (#21)

Improve documentation and fix some version URI error (#21) #16

Workflow file for this run

# Copyright 2023 SkyAPM org
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: publish-docker
on:
push:
branches:
- main
tags:
- v*.*.*
jobs:
build-docker:
# if: github.repository == 'SkyAPM/R3'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Determine tags for Docker image
id: set-tags
run: |
echo "TAGS=${{ github.sha }}" >> $GITHUB_ENV
if [[ "${GITHUB_REF}" == refs/tags/v* ]]; then
echo "TAGS=type=ref,event=tag" >> $GITHUB_ENV
fi
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ghcr.io/${{ github.repository }}
tags: ${{ env.TAGS }}
- name: Build and push Docker images
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}