Skip to content

Commit

Permalink
Add release workflow for cutting tagged images to our registries
Browse files Browse the repository at this point in the history
Added a new `release` workflow that cuts a GitHub release for the given
tag (input from user), and builds and pushes the tag to GHCR and SSF
registries.
  • Loading branch information
jgriff committed Oct 23, 2023
1 parent 76151d0 commit 1d68086
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml → .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: docker
name: dev

on:
push:
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: release

on:
workflow_dispatch:
inputs:
tag:
required: true
type: string
description: "Tag to be released, without leading 'v' (will be added for git tag but omitted from image tag). Ex: 1.0.0-rc1, 1.0.0"

env:
GHCR_REGISTRY: ghcr.io
GHCR_IMAGE: raft-tech/arcadedb
SSF_REGISTRY: nexus.ssf.sclzdev.net
SSF_IMAGE: raft/arcadedb
IB_REGISTRY: registry1.dso.mil

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}

- name: Login to SSF Nexus
uses: docker/login-action@v3
with:
registry: ${{ env.SSF_REGISTRY }}
username: ${{ secrets.SSF_REGISTRY_USER }}
password: ${{ secrets.SSF_REGISTRY_PASS }}

- name: Login to Iron Bank
uses: docker/login-action@v3
with:
registry: ${{ env.IB_REGISTRY }}
username: ${{ secrets.IB_USER }}
password: ${{ secrets.IB_PASS }}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ env.GHCR_REGISTRY }}/${{ env.GHCR_IMAGE }}:${{ inputs.tag }}
${{ env.SSF_REGISTRY }}/${{ env.SSF_IMAGE }}:${{ inputs.tag }}
- name: Create Release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
tag: v${{ inputs.tag }}

0 comments on commit 1d68086

Please sign in to comment.