This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
Release v0.0.1 #patch (#3) #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Automatic Releaser" | |
on: | |
push: | |
branches: | |
- master | |
permissions: | |
contents: write | |
jobs: | |
check-commit: | |
runs-on: ubuntu-latest | |
outputs: | |
msg_check: ${{ steps.check-msg.outputs.match }} | |
steps: | |
- name: Check Message | |
id: check-msg | |
run: | | |
pattern="^Release v[0-9]+.[0-9]+.[0-9]+ #(minor|major|patch)( \(#[0-9]+\))?$" | |
if [[ "${{ github.event.head_commit.message }}" =~ ${pattern} ]]; then | |
echo match=true >> $GITHUB_OUTPUT | |
fi | |
create-tag: | |
runs-on: ubuntu-latest | |
if: needs.check-commit.outputs.msg_check == 'true' | |
needs: check-commit | |
outputs: | |
new_tag: ${{ steps.tagger.outputs.new_tag }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Bump version and push tag | |
id: tagger | |
uses: anothrNick/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WITH_V: true | |
DEFAULT_BUMP: "none" | |
goreleaser: | |
runs-on: ubuntu-latest | |
needs: create-tag | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22 | |
- name: Docker Login | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: | | |
docker login https://ewr.vultrcr.com/slurm -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
version: '~> v2' | |
distribution: goreleaser | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.CR_PAT }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: Clear | |
if: always() | |
run: | | |
rm -f ${HOME}/.docker/config.json | |
munged: | |
runs-on: ubuntu-latest | |
needs: create-tag | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker Login | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: | | |
docker login https://ewr.vultrcr.com/slurm -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./dockers/munged/ | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: | | |
ewr.vultrcr.com/slurm/munged:${{ needs.create-tag.outputs.new_tag }} | |
ewr.vultrcr.com/slurm/munged:latest | |
slurmctld: | |
runs-on: ubuntu-latest | |
needs: create-tag | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker Login | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: | | |
docker login https://ewr.vultrcr.com/slurm -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./dockers/slurmctld/ | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: | | |
ewr.vultrcr.com/slurm/slurmctld:${{ needs.create-tag.outputs.new_tag }} | |
ewr.vultrcr.com/slurm/slurmctld:latest | |
slurmd: | |
runs-on: ubuntu-latest | |
needs: create-tag | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker Login | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: | | |
docker login https://ewr.vultrcr.com/slurm -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./dockers/slurmd/ | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: | | |
ewr.vultrcr.com/slurm/slurmd:${{ needs.create-tag.outputs.new_tag }} | |
ewr.vultrcr.com/slurm/slurmd:latest | |
toolbox: | |
runs-on: ubuntu-latest | |
needs: create-tag | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker Login | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: | | |
docker login https://ewr.vultrcr.com/slurm -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./dockers/slurm-toolbox/ | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: | | |
ewr.vultrcr.com/slurm/toolbox:${{ needs.create-tag.outputs.new_tag }} | |
ewr.vultrcr.com/slurm/toolbox:latest | |
slurmdbd: | |
runs-on: ubuntu-latest | |
needs: create-tag | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker Login | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: | | |
docker login https://ewr.vultrcr.com/slurm -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./dockers/slurmdbd/ | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: | | |
ewr.vultrcr.com/slurm/slurmdbd:${{ needs.create-tag.outputs.new_tag }} | |
ewr.vultrcr.com/slurm/slurmdbd:latest | |
slurmrestd: | |
runs-on: ubuntu-latest | |
needs: create-tag | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker Login | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: | | |
docker login https://ewr.vultrcr.com/slurm -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}" | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./dockers/slurmrestd/ | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: | | |
ewr.vultrcr.com/slurm/slurmrestd:${{ needs.create-tag.outputs.new_tag }} | |
ewr.vultrcr.com/slurm/slurmrestd:latest | |
release: | |
runs-on: ubuntu-latest | |
needs: ["goreleaser", "create-tag"] | |
name: Release Notification | |
steps: | |
- run: | | |
echo "{\"text\":\"slinkee : Release https://github.com/${{ github.repository }}/releases/tag/${{ needs.create-tag.outputs.new_tag }} \"}" > mattermost.json | |
- uses: mattermost/action-mattermost-notify@master | |
env: | |
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }} | |
MATTERMOST_USERNAME: ${{ secrets.MATTERMOST_USERNAME}} | |
MATTERMOST_ICON: ${{ secrets.MATTERMOST_ICON }} |