Skip to content

Merge pull request #108 from cybozu-go/bump-0.13.0 #16

Merge pull request #108 from cybozu-go/bump-0.13.0

Merge pull request #108 from cybozu-go/bump-0.13.0 #16

Workflow file for this run

name: release
on:
push:
tags:
- 'v*'
jobs:
image:
name: Push container image
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- run: make setup
- run: make check-generate
- run: make lint
- run: make test
- run: make docker-build
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push versioned image to ghcr.io
run: |
TAG=${GITHUB_REF#refs/tags/v}
docker tag ghcr.io/cybozu-go/contour-plus:latest ghcr.io/cybozu-go/contour-plus:$TAG
docker push ghcr.io/cybozu-go/contour-plus:$TAG
- name: Push latest image to ghcr.io
if: ${{ !contains(github.ref, '-') }}
run: docker push ghcr.io/cybozu-go/contour-plus:latest
release:
name: Release on GitHub
needs: image
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
See [CHANGELOG.md](./CHANGELOG.md) for details.
draft: false
prerelease: ${{ contains(github.ref, '-') }}