Skip to content

Deploy current version to Scaleway Serverless Container #11

Deploy current version to Scaleway Serverless Container

Deploy current version to Scaleway Serverless Container #11

Workflow file for this run

name: Deploy current version to Scaleway Serverless Container
on: workflow_dispatch
env:
CONTAINER_ID: ${{ vars.SCW_CONTAINER_ID }}
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
CONTAINER_HTTP_OPTION: redirected
jobs:
deploy-to-prod:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Get the current container
uses: scaleway/action-scw@v0
id: container
with:
access-key: ${{ vars.SCW_ACCESS_KEY }}
secret-key: ${{ secrets.SCW_SECRET_KEY }}
default-project-id: ${{ vars.SCW_DEFAULT_PROJECT_ID }}
default-organization-id: ${{ vars.SCW_DEFAULT_ORGANIZATION_ID }}
args: container container get ${{ env.CONTAINER_ID }}
- name: Get Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
- name: Update the container with current tag
uses: scaleway/action-scw@v0
with:
access-key: ${{ vars.SCW_ACCESS_KEY }}
secret-key: ${{ secrets.SCW_SECRET_KEY }}
default-project-id: ${{ vars.SCW_DEFAULT_PROJECT_ID }}
default-organization-id: ${{ vars.SCW_DEFAULT_ORGANIZATION_ID }}
args: >
container container update ${{ env.CONTAINER_ID }}
registry-image=${{ steps.meta.outputs.tags }}
http-option=${{ env.CONTAINER_HTTP_OPTION }}