diff options
| author | Mathieu Deous | 2022-05-02 20:18:23 +0200 |
|---|---|---|
| committer | GitHub | 2022-05-02 20:18:23 +0200 |
| commit | 48936efa96ae17295be4e0a71be3294f0ec6aef8 (patch) | |
| tree | f4e69551f1368aa048edf46b7b061600f3668329 /.github/workflows/docker.yml | |
| parent | bbc738e16f8b637afde58d65196374af98a5e0e2 (diff) | |
Make application go-install-able and create a docker image
Diffstat (limited to '')
| -rw-r--r-- | .github/workflows/docker.yml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..b44e0b7 --- /dev/null +++ b/.github/workflows/docker.yml | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | name: Docker | ||
| 2 | |||
| 3 | on: | ||
| 4 | push: | ||
| 5 | branches: | ||
| 6 | - master | ||
| 7 | tags: | ||
| 8 | - '*' | ||
| 9 | pull_request: | ||
| 10 | branches: | ||
| 11 | - master | ||
| 12 | |||
| 13 | jobs: | ||
| 14 | |||
| 15 | docker-image: | ||
| 16 | name: Build Image | ||
| 17 | runs-on: ubuntu-latest | ||
| 18 | |||
| 19 | steps: | ||
| 20 | - name: Checkout code | ||
| 21 | uses: actions/checkout@v3 | ||
| 22 | |||
| 23 | - name: Setup docker | ||
| 24 | uses: docker/setup-buildx-action@v1 | ||
| 25 | |||
| 26 | - name: Log into container registry | ||
| 27 | uses: docker/login-action@v1 | ||
| 28 | with: | ||
| 29 | registry: ghcr.io | ||
| 30 | username: ${{ github.repository_owner }} | ||
| 31 | password: ${{ secrets.GITHUB_TOKEN }} | ||
| 32 | |||
| 33 | - name: Build image | ||
| 34 | run: make docker | ||
| 35 | |||
| 36 | - name: Test image | ||
| 37 | run: make docker-tests | ||
| 38 | |||
| 39 | - name: Publish image | ||
| 40 | if: github.event_name != 'pull_request' | ||
| 41 | run: make docker-publish | ||
