Update 2021_12_16_141213_create_packages_table.php #310
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Gitlab Docker | |
on: | |
create: | |
tags: | |
- v* | |
pull_request: | |
push: | |
jobs: | |
build_gitlab: | |
name: Gitlab Docker build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Get branch name | |
run: echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
registry: registry.gitlab.com | |
username: ${{ secrets.DOCKER_USER_GITLAB }} | |
password: ${{ secrets.DOCKER_PASS_GITLAB }} | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push branch | |
id: docker_build | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./ | |
file: ./Dockerfile | |
push: true | |
tags: registry.gitlab.com/mw-internal/package-manager/package-manager-worker:${{ env.BRANCH }} | |
build-args: | | |
BRANCH=${{ env.BRANCH }} | |
- name: Build and push latest | |
id: docker_build_latest | |
if: github.ref == 'refs/heads/master' | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./ | |
file: ./Dockerfile | |
push: true | |
tags: registry.gitlab.com/mw-internal/package-manager/package-manager-worker:latest | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |