Skip to content

Init

Init #1

Workflow file for this run

name: release
concurrency:
group: release
cancel-in-progress: true
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+*'
jobs:
container_image:
name: container_image
runs-on: ubuntu-latest
outputs:
image: ${{ steps.set-image-name.outputs.image }}
steps:
- name: Checkout code
uses: actions/checkout@main
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@master
- name: image name
id: set-image-name
run: |
name="$(echo ${{ github.repository }} | tr 'A-Z' 'a-z')"
echo "image=ghcr.io/$name:${{ github.ref_name }}" >> $GITHUB_OUTPUT
- name: Login to GitHub Container Registry
uses: docker/login-action@master
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@master
with:
context: .
push: true
tags: ${{ steps.set-image-name.outputs.image }}
cache-from: type=gha
cache-to: type=gha,mode=max
release:
name: release
runs-on: ubuntu-latest
needs: [container_image]
steps:
- name: download cache-artifacts
uses: actions/cache/restore@main
with:
path: ./artifacts
key: artifacts
- name: ${{ github.ref_name }}
uses: softprops/action-gh-release@v2
with:
body: |
container image:
```
${{ needs.container_image.outputs.image }}
```
files: |
./artifacts/*