Switch to our new SCW deploy action #12
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: CI | |
on: [push] | |
jobs: | |
publish-hidora: | |
name: Deploy to Docker Hub & Scaleway | |
if: github.event_name != 'pull_request' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Extract Docker metadata | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
images: httptoolkit/anonymizing-reverse-proxy | |
tags: | | |
type=raw,value=prod,enable={{is_default_branch}} | |
type=raw,value=latest,enable={{is_default_branch}} | |
type=sha | |
- name: Publish to Docker Hub | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Redeploy container | |
uses: httptoolkit/scaleway-serverless-container-deploy-action@v1 | |
with: | |
container_id: ${{ vars.SCW_API_CONTAINER_ID }} | |
secret_key: ${{ secrets.SCW_SECRET_KEY }} | |
registry_image_url: "registry.hub.docker.com/httptoolkit/anonymizing-reverse-proxy:prod" |