Skip to content

fix: actions

fix: actions #1

Workflow file for this run

name: ci
on:
push:
tags:
- "*"
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
gmorse81/go-rest-api-kubernetes-example
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
helmRelease:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.8.1
- name: custom packaging
run: |
VERSION=${{github.ref_name}}
rm -rf .cr-release-packages
mkdir -p .cr-release-packages
helm package charts/youtube-stats-chart --app-version=${VERSION:1} --version=${VERSION:1} --destination=.cr-release-packages
- name: Run chart-releaser
# switch back to helm/chart-releaser-action if this contribution is ever merged
uses: askcloudarchitech/chart-releaser-action@skip-packaging-option
with:
skip_packaging: true
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"