Skip to content

Commit

Permalink
Merge pull request #8 from uselagoon/fix-release
Browse files Browse the repository at this point in the history
fix: tag release images too
  • Loading branch information
smlx authored Jan 28, 2022
2 parents a6f0ea8 + 5dcc65f commit 092541c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ jobs:
binary:
- service-api
- ssh-portal
needs: release
needs:
- tag
- release
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
38 changes: 31 additions & 7 deletions .github/workflows/tag-to-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,47 @@ jobs:
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload binaries
uses: actions/upload-artifact@v2
with:
name: dist
path: dist
releaseimage:
strategy:
matrix:
binary:
- service-api
- ssh-portal
needs:
- tag
- release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download binaries
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
id: service_api_meta
# this id is namespaced per matrix run
id: docker_metadata
uses: docker/metadata-action@v3
with:
images: uselagoon/lagoon-ssh-portal/service-api
- name: Build and push service-api container image
images: ghcr.io/uselagoon/lagoon-ssh-portal/${{ matrix.binary }}
- name: Build and push ${{ matrix.binary }} container image
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/${{ steps.service_api_meta.outputs.tags }}
labels: ${{ steps.service_api_meta.outputs.labels }}
file: deploy/service-api/Dockerfile
context: dist/lagoon-ssh-portal_linux_amd64
tags: ${{ steps.docker_metadata.outputs.tags }}
labels: ${{ steps.docker_metadata.outputs.labels }}
file: deploy/${{ matrix.binary }}/Dockerfile
context: dist/${{ matrix.binary }}_linux_amd64

0 comments on commit 092541c

Please sign in to comment.