1
0
mirror of https://github.com/b4tman/docker-squid.git synced 2024-11-10 21:56:53 +00:00
docker-squid/.github/workflows/dockerimage.yml
2019-09-24 16:07:16 +03:00

44 lines
1.7 KiB
YAML

name: Docker Image CI
on:
push:
branches:
- master
- v3
- v4
pull_request:
branches:
- master
- v3
- v4
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Build the Docker image
run: docker build . --file Dockerfile --tag b4tman/squid
- name: Test image
run: docker-compose -f docker-compose.test.yml up sut
- name: Build 'ssl-bump' Docker image
run: docker build ssl-bump --tag b4tman/squid:ssl-bump
- name: GituHub Packages - Docker Login
if: github.event_name == 'push'
run: docker login docker.pkg.github.com -u ${{secrets.GITHUB_PKGS_LOGIN}} -p ${{secrets.GITHUB_PKGS_TOKEN}}
- name: GituHub Packages - Docker Tag
if: github.event_name == 'push'
run: docker tag b4tman/squid docker.pkg.github.com/${{github.repository}}/squid:$(echo ${{github.ref}} | sed 's/.*\/.*\///')
- name: GituHub Packages - Docker Tag 'ssl-bump'
if: github.event_name == 'push'
run: docker tag b4tman/squid:ssl-bump docker.pkg.github.com/${{github.repository}}/ssl-bump:$(echo ${{github.ref}} | sed 's/.*\/.*\///')
- name: GituHub Packages - Docker Push
if: github.event_name == 'push'
run: docker push docker.pkg.github.com/${{github.repository}}/squid:$(echo ${{github.ref}} | sed 's/.*\/.*\///')
- name: GituHub Packages - Docker Push 'ssl-bump'
if: github.event_name == 'push'
run: docker push docker.pkg.github.com/${{github.repository}}/ssl-bump:$(echo ${{github.ref}} | sed 's/.*\/.*\///')
- name: GituHub Packages - Docker Logout
if: github.event_name == 'push'
run: docker logout docker.pkg.github.com