Skip to content

[ci] Add test stage to gitlab ci #97

[ci] Add test stage to gitlab ci

[ci] Add test stage to gitlab ci #97

name: Docker-Publish
on:
push:
branches: [ master ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
branches: [ master ]
jobs:
vault:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log into registry ghcr.io
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/medleybox/vault
- name: Build and push Vault image
uses: docker/build-push-action@v2
with:
file: Dockerfile
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
messenger:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: [vault]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Log into registry ghcr.io
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/medleybox/messenger
- name: Build and push image
uses: docker/build-push-action@v2
with:
file: Dockerfile-messenger
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}