Merge pull request #157 from makeopensource/task-86-update_for_studen… #17
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
# Builds DevU images on develop | |
# tagged as beta | |
name: Build DevU beta | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
build-docker: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # to be able to publish a GitHub release | |
issues: write # to be able to comment on released issues | |
pull-requests: write # to be able to comment on released pull requests | |
packages: write # to be able to publish docker image packages | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
# todo run tests | |
# docker image build | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GHCR registry | |
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Convert image name to lowercase | |
run: | | |
original_string=${{ github.repository }} | |
echo "repo_url=$(echo $original_string | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV | |
# beta tags | |
- name: API beta image | |
run: | | |
docker build . -f api.Dockerfile -t ghcr.io/${{ env.repo_url }}-api:beta | |
docker push ghcr.io/${{ env.repo_url }}-api:beta | |
- name: client beta image | |
run: | | |
docker build . -f client.Dockerfile -t ghcr.io/${{ env.repo_url }}-client:beta | |
docker push ghcr.io/${{ env.repo_url }}-client:beta | |
- name: nginx beta image | |
run: | | |
docker build . -f nginx.Dockerfile -t ghcr.io/${{ env.repo_url }}-nginx:beta | |
docker push ghcr.io/${{ env.repo_url }}-nginx:beta | |
- name: build tango image | |
run: | | |
docker build ./tango -f ./tango/Dockerfile -t ghcr.io/${{ env.repo_url }}-tango:beta | |
docker push ghcr.io/${{ env.repo_url }}-tango:beta | |