mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-03-03 10:30:19 +00:00
47 lines
1.7 KiB
YAML
47 lines
1.7 KiB
YAML
name: release
|
|
|
|
on:
|
|
push:
|
|
tags: '*'
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: crazy-max/ghaction-docker-buildx@v1
|
|
- name: Publish multi-arch image
|
|
run: |
|
|
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login --username "${{ secrets.DOCKER_USERNAME }}" --password-stdin
|
|
docker buildx build --platform "linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64" \
|
|
--output "type=image,push=true" \
|
|
--build-arg "REVISION=${GITHUB_SHA}" \
|
|
--build-arg "VERSION=${GITHUB_REF#refs/tags/}" \
|
|
--build-arg "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
|
|
--tag "docker.io/stefanprodan/podinfo:${GITHUB_REF#refs/tags/}" \
|
|
--tag "docker.io/stefanprodan/podinfo:latest" \
|
|
--file Dockerfile .
|
|
- name: Publish base image
|
|
uses: docker/build-push-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
repository: stefanprodan/podinfo-base
|
|
tags: latest
|
|
- name: Publish helm chart
|
|
uses: ./.github/actions/helm-gh-pages
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: ./.github/actions/release-notes
|
|
- name: Generate release notes
|
|
run: |
|
|
echo 'CHANGELOG' > /tmp/release.txt
|
|
github-release-notes -org stefanprodan -repo podinfo -since-latest-release >> /tmp/release.txt
|
|
- name: Publish release
|
|
uses: goreleaser/goreleaser-action@v1
|
|
with:
|
|
version: latest
|
|
args: release --release-notes=/tmp/release.txt
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|