Merge pull request #915 from thunderstore-io/task-limits #116
Workflow file for this run
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: Release | |
on: | |
push: | |
tags: | |
- "*.*.*" | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: false | |
- name: Get tag | |
id: tag | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/tags/} | |
- name: Build Docker image | |
run: docker build -t thunderstore:latest -t thunderstore:release-${TAG} . | |
- name: Run pytest | |
run: | | |
DJANGO_IMAGE="thunderstore:release-${TAG}" docker-compose -f docker/docker-compose.pytest.yml up --exit-code-from django | |
docker-compose -f docker/docker-compose.pytest.yml down -f | |
- name: Tag image | |
env: | |
TAG: ${{ steps.tag.outputs.tag }} | |
run: | | |
docker tag thunderstore:latest thunderstore/thunderstore:release-${TAG} | |
docker tag thunderstore:latest ghcr.io/thunderstore-io/thunderstore:release-${TAG} | |
- name: Login to Docker Hub | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | |
- name: Push image to Docker Hub | |
env: | |
TAG: ${{ steps.tag.outputs.tag }} | |
run: | | |
echo "Pushing thunderstore/thunderstore:release-${TAG}" | |
docker push thunderstore/thunderstore:release-${TAG} | |
- name: Login to GitHub Container Registry | |
env: | |
DOCKER_USERNAME: ${{ secrets.GHCR_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.GHCR_PAT }} | |
run: docker login ghcr.io -u $DOCKER_USERNAME -p $DOCKER_PASSWORD | |
- name: Push image to GitHub Container Registry | |
env: | |
TAG: ${{ steps.tag.outputs.tag }} | |
run: | | |
echo "Pushing ghcr.io/thunderstore-io/thunderstore:release-${TAG}" | |
docker push ghcr.io/thunderstore-io/thunderstore:release-${TAG} |