π test workflow #1
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
name: Build & push vMonitor-Metrics-Agent Docker Image | ||
on: | ||
push | ||
jobs: | ||
build: | ||
name: Build & push docker image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
# - name: Create image name env | ||
# run: | | ||
# echo "IMG_NAME=${{ vars.DOCKERHUB_USERNAME }}/${{ env.REPO_NAME }}" >> $GITHUB_ENV | ||
# - name: debug | ||
# run: | | ||
# echo ${{ env.IMG_NAME }} | ||
# - name: Docker metadata | ||
# id: metadata | ||
# uses: docker/metadata-action@v4 | ||
# with: | ||
# images: | | ||
# ${{ env.IMG_NAME }} | ||
# tags: | | ||
# type=semver,pattern={{version}} | ||
# type=semver,pattern={{major}}.{{minor}} | ||
# type=raw,value={{sha}},enable=${{ github.ref_type != 'tag' }} | ||
- name: Log in to the GHCR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v4 | ||
env: | ||
TELEGRAF_VERSION: 1.26.0-1.0.2 | ||
with: | ||
context: ./docker | ||
push: true | ||
tags: | | ||
Check failure on line 44 in .github/workflows/build-and-push-docker.yml GitHub Actions / Build & push vMonitor-Metrics-Agent Docker ImageInvalid workflow file
Check failure on line 44 in .github/workflows/build-and-push-docker.yml GitHub Actions / Build & push vMonitor-Metrics-Agent Docker ImageInvalid workflow file
Check failure on line 44 in .github/workflows/build-and-push-docker.yml GitHub Actions / Build & push vMonitor-Metrics-Agent Docker ImageInvalid workflow file
|
||
ghcr.io/anngdinh/telegraf:${{ TELEGRAF_VERSION }} | ||
labels: ${{ steps.metadata.outputs.labels }} | ||
# build-alpine: | ||
# name: Build & push docker image Alpine | ||
# runs-on: ubuntu-20.04 | ||
# steps: | ||
# - name: Checkout repository | ||
# uses: actions/[email protected] | ||
# - name: Create image name env | ||
# run: | | ||
# echo "IMG_NAME=${{ vars.DOCKERHUB_USERNAME }}/${{ env.REPO_NAME }}" >> $GITHUB_ENV | ||
# - name: debug | ||
# run: | | ||
# echo ${{ env.IMG_NAME }} | ||
# - name: Docker metadata | ||
# id: metadata | ||
# uses: docker/metadata-action@v4 | ||
# with: | ||
# images: | | ||
# ${{ env.IMG_NAME }} | ||
# tags: | | ||
# type=semver,pattern={{version}},suffix=-alpine | ||
# type=semver,pattern={{major}}.{{minor}},suffix=-alpine | ||
# type=raw,value={{sha}}-alpine,enable=${{ github.ref_type != 'tag' }} | ||
# - name: Login to Docker Hub | ||
# uses: docker/login-action@v2 | ||
# with: | ||
# username: ${{ vars.DOCKERHUB_USERNAME }} | ||
# password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
# - name: Build and push Docker image | ||
# uses: docker/build-push-action@v4 | ||
# with: | ||
# context: ./docker/alpine | ||
# push: ${{ inputs.push_to_hub }} | ||
# tags: ${{ steps.metadata.outputs.tags }} | ||
# labels: ${{ steps.metadata.outputs.labels }} |