Skip to content

Release

Release #38

Workflow file for this run

name: Release
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get git version
run: echo "GIT_VERSION=$(git describe --tags)" >> $GITHUB_ENV
- name: Echo version
run: echo $GIT_VERSION
- name: Echo version again
run: echo ${{env.GIT_VERSION}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: set up docker buildx
uses: docker/setup-buildx-action@v3
- name: log into GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/molssi-seamm/seamm
tags:
type=semver,pattern={{version}},value=${{ env.GIT_VERSION }}
annotations: |
org.opencontainers.image.description=SEAMM environment
org.opencontainers.image.title=SEAMM
org.opencontainers.image.authors=Paul Saxe <psaxe@vt.edu>
labels: |
org.opencontainers.image.description=SEAMM environment
org.opencontainers.image.title=SEAMM
org.opencontainers.image.authors=Paul Saxe <psaxe@vt.edu>
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./environments
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
annotations: ${{ steps.meta.outputs.annotations }}
labels: ${{ steps.meta.outputs.labels }}
- name: Get message
run: |
{
echo 'SLACK_MESSAGE<<EOF'
git log -1 | sed 1,4d
echo EOF
} >> "$GITHUB_ENV"
- name: Post to a Slack channel
id: slack
uses: slackapi/slack-github-action@v1.25.0
with:
channel-id: 'github'
slack-message: ${{ env.SLACK_MESSAGE }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}