jdk21 #53
Workflow file for this run
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: Docker Image CI | |
on: [push] | |
jobs: | |
build-primary: | |
runs-on: ubuntu-latest | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: rlespinasse/[email protected] | |
- name: Print slug variables | |
run: | | |
echo ${{ env.GITHUB_REF_SLUG }} | |
echo ${{ env.GITHUB_HEAD_REF_SLUG }} | |
echo ${{ env.GITHUB_BASE_REF_SLUG }} | |
- name: Set env | |
run: echo ::set-env name=BRANCH_TAG::$(git describe --contains | grep v | grep -v '~' | head -n 1 || true) | |
- name: Build the Docker image | |
run: | | |
env | |
echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json | |
sudo service docker restart | |
docker build --squash --tag septimalmind/izumi-env:latest --tag septimalmind/izumi-env:${GITHUB_REF_SLUG} --tag septimalmind/izumi-env:${GITHUB_SHA} izumi-env | |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | |
docker push septimalmind/izumi-env:latest | |
docker push septimalmind/izumi-env:${GITHUB_REF_SLUG} | |
docker push septimalmind/izumi-env:${GITHUB_SHA} | |
if [[ ! -z "$BRANCH_TAG" ]] ; then docker push septimalmind/izumi-env:${BRANCH_TAGYt} ; fi | |
build-light: | |
runs-on: ubuntu-latest | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: rlespinasse/[email protected] | |
- name: Print slug variables | |
run: | | |
echo ${{ env.GITHUB_REF_SLUG }} | |
echo ${{ env.GITHUB_HEAD_REF_SLUG }} | |
echo ${{ env.GITHUB_BASE_REF_SLUG }} | |
- name: Set env | |
run: echo ::set-env name=BRANCH_TAG::$(git describe --contains | grep v | grep -v '~' | head -n 1 || true) | |
- name: Build the Docker image | |
run: | | |
env | |
echo '{"experimental":true}' | sudo tee /etc/docker/daemon.json | |
sudo service docker restart | |
docker build --squash --tag septimalmind/izumi-env-light:latest --tag septimalmind/izumi-env-light:${GITHUB_REF_SLUG} --tag septimalmind/izumi-env-light:${GITHUB_SHA} izumi-env-light | |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin | |
docker push septimalmind/izumi-env-light:latest | |
docker push septimalmind/izumi-env-light:${GITHUB_REF_SLUG} | |
docker push septimalmind/izumi-env-light:${GITHUB_SHA} | |
if [[ ! -z "$BRANCH_TAG" ]] ; then docker push septimalmind/izumi-env-light:${BRANCH_TAGYt} ; fi |