Setup for automatic deployment to gh-pages

This commit is contained in:
Bojan Čekrlić 2020-10-25 18:02:00 +01:00
parent 6bae2c20ba
commit 7f0ab1e24f
3 changed files with 29 additions and 7 deletions

View file

@ -2,14 +2,25 @@ name: Docker tag image
on:
push:
tags: ['*']
tags: [ 'v*.*.*' ]
jobs:
buildx:
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: Checkout tag
uses: actions/checkout@v2
- name: Checkout gh-pages
uses: actions/checkout@v2
with:
ref: "gh-pages"
- name: Get the build version number
shell: bash
run: |
echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10})
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
@ -20,5 +31,14 @@ jobs:
DOCKER_USERNAME: 'boky'
DOCKER_PASSWORD: '${{ secrets.DOCKER_ACCESS_TOKEN }}'
PLATFORMS: "linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le"
run: ./build.sh -t boky/postfix:$(echo ${GITHUB_REF:10}) --push
run: ./build.sh -t boky/postfix:$RELEASE_VERSION --push
- name: Package helm chart
uses: WyriHaximus/github-action-helm3@v2
with:
# Successfully packaged chart and saved it to: /Users/boky/development/projects/docker-postfix/mail-2.1.0.tgz
exec: helm package --app-version $RELEASE_VERSION --version $RELEASE_VERSION --destination ./public helm/mail
- name: Chart to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public

4
.gitignore vendored
View file

@ -1,2 +1,4 @@
.idea
helm/fixtures
helm/fixtures
public
gh-pages

View file

@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.0
version: v1.0.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 1.0.0
appVersion: v1.0.0