Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/detect-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
run: |
t_branch='update-${{ matrix.channel }}-to-${{ steps.version.outputs.build_version }}'
git config user.name github-actions
git config user.email [email protected]
git config user.email "<>"
git pull
git checkout -b "$t_branch" origin/master
git add '${{ matrix.channel }}'
Expand Down
42 changes: 23 additions & 19 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,46 @@ on:
tags:
- "v*"

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
publish-docker:
name: Publish Docker Image
build-and-push-image:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
lfs: true

- name: Extract release channel
id: channel
run: |
channel=$(cut -d - -f 2 <<< "${{ github.ref_name }}")
echo "channel=$channel" >> $GITHUB_OUTPUT
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/unusualalpha/ib-gateway
flavor: |
latest=false
tags: |
type=match,pattern=v(\d+.\d+),group=1
type=match,pattern=v(\d+.\d+.\w+),group=1
type=match,pattern=v(\d+.\d+.\w+)+\-(stable|latest),group=2

- name: Log in to the Container registry
uses: docker/login-action@v2
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v3
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: ${{ steps.channel.outputs.channel }}
push: true
Expand Down