Skip to content

Commit

Permalink
Deploy Docker Image with GitHub Actions (#5)
Browse files Browse the repository at this point in the history
This PR adds automated Docker image deployment to CI.

### Test Plan

Deploy an image with CI:
https://github.com/cowprotocol/token-subgraph/actions/runs/4513583889/jobs/7948607289?pr=5
  • Loading branch information
nlordell authored Mar 24, 2023
1 parent ac4d15b commit 8666112
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: deploy
on:
push:
branches: [main]
tags: [v*]

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3

- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}
labels: |
org.opencontainers.image.licenses=MIT OR Apache-2.0
- uses: docker/build-push-action@v4
with:
context: server
file: server/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 8666112

Please sign in to comment.