Skip to content

Commit

Permalink
feat: auto build and publish master on Scaleway 馃挏
Browse files Browse the repository at this point in the history
  • Loading branch information
charlyx committed Apr 10, 2022
1 parent 3f98e4c commit 4bd84de
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get dependencies
run: |
Expand All @@ -38,3 +38,33 @@ jobs:

- name: golangci-lint
uses: golangci/golangci-lint-action@v3

deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
env:
REGISTRY: rg.fr-par.scw.cloud/funcscwavatarsiof8rxvgzb
FULL_IMAGE_NAME: rg.fr-par.scw.cloud/funcscwavatarsiof8rxvgzb/avatars-io:latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Scaleway Container Registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ env.FULL_IMAGE_NAME }}
cache-from: type=registry,ref=${{ env.FULL_IMAGE_NAME }}
cache-to: type=inline

0 comments on commit 4bd84de

Please sign in to comment.