Release 1.0.11 #7
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: Create packages | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- closed | |
jobs: | |
main: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Build and push images | |
working-directory: production | |
env: | |
DOCKER_BUILDKIT: 1 | |
COMPOSE_DOCKER_CLI_BUILD: 1 | |
GH_ACTOR: ${{ github.actor }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GH_HEAD_REF: ${{ github.head_ref }} | |
run: | | |
echo "${GH_TOKEN}" | docker login ghcr.io -u "${GH_ACTOR}" --password-stdin | |
tag="${GH_HEAD_REF}"-test | |
docker pull "ghcr.io/nbisweden/urdr-web:latest" || true | |
docker pull "ghcr.io/nbisweden/urdr-web:$tag" || true | |
cat > urdr.env <<END | |
PUBLIC_API_URL="https://urdr-test.nbis.se" | |
PUBLIC_REDMINE_URL="https://urdr-test-redmine.nbis.se" | |
END | |
TAG="$tag" docker-compose --env-file urdr.env build --build-arg BUILDKIT_INLINE_CACHE=1 nginx | |
docker push "ghcr.io/nbisweden/urdr-web:$tag" |