Skip to content

fix: create an image with the tag latest #135

fix: create an image with the tag latest

fix: create an image with the tag latest #135

Workflow file for this run

name: test
on:
push:
pull_request:
types: [opened, reopened, synchronize]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Load configuration
run: |
echo opensource_COBOL_4J_version="$(jq -r '.opensource_COBOL_4J_version' build-config.json)" >> $GITHUB_ENV
echo Open_COBOL_ESQL_4J_version="$(jq -r '.Open_COBOL_ESQL_4J_version' build-config.json)" >> $GITHUB_ENV
echo version_string_prefix="$(jq -r '.version_string_prefix' build-config.json)" >> $GITHUB_ENV
- name: Build a docker image
run: |
docker build -t opensourcecobol/opensourcecobol4j:"$version_string_prefix"-debug . \
--build-arg opensource_COBOL_4J_version="$opensource_COBOL_4J_version" \
--build-arg Open_COBOL_ESQL_4J_version="$Open_COBOL_ESQL_4J_version"
- name: Copy Docker image
run: |
docker tag opensourcecobol/opensourcecobol4j:"$version_string_prefix"-debug opensourcecobol/opensourcecobol4j:"$version_string_prefix"-debug-latest
- name: Login to Docker Hub
if: github.ref == 'refs/heads/y-sakamoto/auto-deploy' && github.event_name == 'push'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push to Docker Hub
if: github.ref == 'refs/heads/y-sakamoto/auto-deploy' && github.event_name == 'push'
run: |
docker push opensourcecobol/opensourcecobol4j:"$version_string_prefix"-debug
docker push opensourcecobol/opensourcecobol4j:"$version_string_prefix"-debug-latest
utf8-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Load configuration
run: |
echo opensource_COBOL_4J_version="$(jq -r '.opensource_COBOL_4J_version' build-config.json)" >> $GITHUB_ENV
echo Open_COBOL_ESQL_4J_version="$(jq -r '.Open_COBOL_ESQL_4J_version' build-config.json)" >> $GITHUB_ENV
echo version_string_prefix="$(jq -r '.version_string_prefix' build-config.json)" >> $GITHUB_ENV
- name: Build a docker image
run: |
docker build -t opensourcecobol/opensourcecobol4j:utf8-"$version_string_prefix"-debug . \
--build-arg opensource_COBOL_4J_version="$opensource_COBOL_4J_version" \
--build-arg Open_COBOL_ESQL_4J_version="$Open_COBOL_ESQL_4J_version"
- name: Login to Docker Hub
if: github.ref == 'refs/heads/y-sakamoto/auto-deploy' && github.event_name == 'push'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push to Docker Hub
if: github.ref == 'refs/heads/y-sakamoto/auto-deploy' && github.event_name == 'push'
run: |
docker push opensourcecobol/opensourcecobol4j:utf8-"$version_string_prefix"-debug