28
loading...
This website collects cookies to deliver better user experience
Settings -> Secrets
I’ve created four environment variables that have been encrypted:akkasls projects get <project name>
will show the ID of the project in the ID column)akkasls auth tokens create --type=refresh --scopes=execution --description="My CI/CD token"
).github/workflows
folder of the repository.deploy.yaml
and stored it in the .github/workflows
folder of my repository.name: akkasls-deployer
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push to Docker Hub
uses: docker/build-push-action@v2
with:
push: true
tags: retgits/myapp:1.0.0
- name: Deploy to Akka Serverless
uses: retgits/akkasls-action@v1
with:
cmd: "services deploy myapp retgits/myapp:1.0.0"
env:
token: ${{ secrets.TOKEN }}
project: ${{ secrets.PROJECT }}
name: akkasls-deployer
on:
push:
branches: [main]
workflow_dispatch:
push
to the main
branch or when it is triggered from the workflow (which is done by the workflow_dispatch
setting and is useful if you want to trigger the workflow without pushing to the main branch).jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push to Docker Hub
uses: docker/build-push-action@v2
with:
push: true
tags: retgits/myapp:1.0.0
retgits/myapp:1.0.0
. This is obviously where you want to use some parameterization and use the name of the tag, the GitHub commit SHA, or something else to uniquely identify the container image.- name: Deploy to Akka Serverless
uses: retgits/akkasls-action@v1
with:
cmd: "services deploy myapp retgits/myapp:1.0.0"
env:
token: ${{ secrets.TOKEN }}
project: ${{ secrets.PROJECT }}
28