Skip to content

ci: experiment with publishing dev docker images #3

ci: experiment with publishing dev docker images

ci: experiment with publishing dev docker images #3

name: Publish Dev Docker Image
on:
push:
branches:
- "**"
jobs:
set-tag:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.gen_version.outputs.VERSION }}
steps:
- name: set values
id: gen_version
run: |
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Use the value
# this sets environment variables for this step
env:
VERSION:
run: |
echo "${VERSION}"
docker:
runs-on: ubuntu-latest
steps:
- name: set tag
id: set_tag
run: |
echo "TAG=${GITHUB_REF}" | sed 's/\//_/g' >> $GITHUB_OUTPUT
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# - name: Build and export to Docker
# uses: docker/build-push-action@v6
# with:
# load: true
# tags: ${{ env.TEST_TAG }}
# - name: Test
# run: |
# docker run --rm ${{ env.TEST_TAG }}
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: ${{ vars.DOCKERHUB_USERNAME }}/supertokens-core:dev-branch-${{ steps.set_tag.outputs.TAG }}
file: .github/helpers/Dockerfile