diff --git a/.github/workflows/tags.yml b/.github/workflows/tags.yml index 01b6161..4adcdc9 100644 --- a/.github/workflows/tags.yml +++ b/.github/workflows/tags.yml @@ -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 diff --git a/.gitignore b/.gitignore index 17390e6..0c50e25 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .idea -helm/fixtures \ No newline at end of file +helm/fixtures +public +gh-pages \ No newline at end of file diff --git a/helm/mail/Chart.yaml b/helm/mail/Chart.yaml index b9e151a..7139763 100644 --- a/helm/mail/Chart.yaml +++ b/helm/mail/Chart.yaml @@ -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