2019-09-04 06:38:16 +00:00
|
|
|
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
|
2019-09-24 12:46:08 +00:00
|
|
|
run: docker build . --file Dockerfile --tag b4tman/squid
|
2019-09-04 06:38:16 +00:00
|
|
|
- name: Test image
|
|
|
|
run: docker-compose -f docker-compose.test.yml up sut
|
2019-09-24 12:46:08 +00:00
|
|
|
- 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'
|
2019-09-24 13:07:16 +00:00
|
|
|
run: docker push docker.pkg.github.com/${{github.repository}}/squid:$(echo ${{github.ref}} | sed 's/.*\/.*\///')
|
2019-09-24 12:46:08 +00:00
|
|
|
- name: GituHub Packages - Docker Push 'ssl-bump'
|
|
|
|
if: github.event_name == 'push'
|
2019-09-24 13:07:16 +00:00
|
|
|
run: docker push docker.pkg.github.com/${{github.repository}}/ssl-bump:$(echo ${{github.ref}} | sed 's/.*\/.*\///')
|
2019-09-24 12:46:08 +00:00
|
|
|
- name: GituHub Packages - Docker Logout
|
|
|
|
if: github.event_name == 'push'
|
|
|
|
run: docker logout docker.pkg.github.com
|