fix: fix ci (#38) #126
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker internal build | |
# This workflow is triggered on pushes to the repository. | |
on: | |
push: | |
branches: | |
- main | |
- staging | |
jobs: | |
test: | |
name: Test & coverage | |
uses: ./.github/workflows/ci.yml | |
push_to_registry: | |
name: Push Docker image to Docker Hub | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v3 | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
ghcr.io/${{ github.repository }} | |
- name: Login to Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GHCR_TOKEN }} | |
- name: Set output | |
id: vars | |
run: echo ::set-output name=tag::${GITHUB_REF##*/} | |
- name: Build and push Docker image | |
uses: docker/[email protected] | |
with: | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
build-args: | | |
VERSION=${{ steps.vars.outputs.tag }} | |
context: ./ |