Merge pull request #1039 from thunderstore-io/autolist-default-packages #148
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 | |
DJANGO_IMAGE="thunderstore:release-${TAG}" docker compose -f docker/docker-compose.pytest.yml down | |
- 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} |