mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
* Add new `VERSION` to `docker_migrate.sh` script * Add missing `SAML_KEYFILE_PATH` and `SAML_CERTFILE_PATH` env vars to migrate script * Add missing `PHOENIX_PORT` var * Bump Elixir to 1.14.3 * Bump Erlang to 25.2.1 * Update docs to document new VERSION var in docker-compose.yml upgrade mechanism Fixes #1395
42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
name: Publish image to Docker Hub
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
deploy-app:
|
|
env:
|
|
DOCKERHUB_REGISTRY: docker.io
|
|
GITHUB_REGISTRY: ghcr.io
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ${{ env.GITHUB_REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Get minor version of ref
|
|
env:
|
|
VERSION: ${{ github.ref_name }}
|
|
id: get-minor
|
|
run: echo "::set-output name=fragment::${VERSION%.*}"
|
|
|
|
- name: Copy image from Github (staging) to Docker (production)
|
|
uses: akhilerm/tag-push-action@v2.1.0
|
|
with:
|
|
src: ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME}}:${{ github.ref_name }}
|
|
dst: |
|
|
${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME}}:latest
|
|
${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME}}:${{ steps.get-minor.outputs.fragment }}
|
|
${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME}}:${{ github.ref_name }}
|