Skip to content

Switch to our new SCW deploy action #12

Switch to our new SCW deploy action

Switch to our new SCW deploy action #12

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"